Merge "Remove extra unneeded whitespace"
authorTim Starling <tstarling@wikimedia.org>
Fri, 18 May 2012 04:57:44 +0000 (04:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 18 May 2012 04:57:44 +0000 (04:57 +0000)
149 files changed:
RELEASE-NOTES-1.20
docs/distributors.txt
docs/hooks.txt
includes/AutoLoader.php
includes/DataUpdate.php [new file with mode: 0644]
includes/DefaultSettings.php
includes/Exception.php
includes/Export.php
includes/FakeTitle.php
includes/Fallback.php
includes/FeedUtils.php
includes/FileDeleteForm.php
includes/ForkController.php
includes/FormOptions.php
includes/GitInfo.php
includes/GlobalFunctions.php
includes/HTMLForm.php
includes/HistoryBlob.php
includes/HttpFunctions.old.php
includes/HttpFunctions.php
includes/IP.php
includes/ImagePage.php
includes/LinksUpdate.php
includes/Namespace.php
includes/Pager.php
includes/QueryPage.php
includes/SqlDataUpdate.php [new file with mode: 0644]
includes/Title.php
includes/User.php
includes/WikiPage.php
includes/api/ApiMain.php
includes/api/ApiPurge.php
includes/api/ApiQueryRevisions.php
includes/debug/Debug.php
includes/filerepo/FileRepo.php
includes/filerepo/backend/FSFileBackend.php
includes/filerepo/backend/FileBackend.php
includes/filerepo/backend/FileBackendGroup.php
includes/filerepo/backend/FileBackendMultiWrite.php
includes/filerepo/backend/FileBackendStore.php
includes/filerepo/backend/FileOp.php
includes/filerepo/backend/FileOpBatch.php [new file with mode: 0644]
includes/filerepo/backend/SwiftFileBackend.php
includes/filerepo/backend/filejournal/DBFileJournal.php
includes/filerepo/backend/filejournal/FileJournal.php
includes/job/RefreshLinksJob.php
includes/logging/LogPage.php
includes/objectcache/BagOStuff.php
includes/objectcache/MemcachedBagOStuff.php [new file with mode: 0644]
includes/objectcache/MemcachedClient.php
includes/objectcache/MemcachedPeclBagOStuff.php [new file with mode: 0644]
includes/objectcache/MemcachedPhpBagOStuff.php
includes/objectcache/ObjectCache.php
includes/objectcache/SqlBagOStuff.php
includes/parser/ParserOutput.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Preprocessor_HipHop.hphp
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/revisiondelete/RevisionDelete.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialFewestrevisions.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialMostcategories.php
includes/specials/SpecialMostlinked.php
includes/specials/SpecialMostlinkedtemplates.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialWantedpages.php
includes/specials/SpecialWantedtemplates.php
includes/upload/UploadBase.php
includes/zhtable/.gitignore [new file with mode: 0644]
includes/zhtable/Makefile.py [changed mode: 0644->0755]
languages/Names.php
languages/messages/MessagesAr.php
languages/messages/MessagesAst.php
languages/messages/MessagesBa.php
languages/messages/MessagesBcl.php
languages/messages/MessagesBe_tarask.php
languages/messages/MessagesBg.php
languages/messages/MessagesBn.php
languages/messages/MessagesCa.php
languages/messages/MessagesCs.php
languages/messages/MessagesDe.php
languages/messages/MessagesDiq.php
languages/messages/MessagesDsb.php
languages/messages/MessagesEl.php
languages/messages/MessagesEn.php
languages/messages/MessagesEo.php
languages/messages/MessagesEs.php
languages/messages/MessagesFr.php
languages/messages/MessagesFrr.php
languages/messages/MessagesFur.php
languages/messages/MessagesGa.php
languages/messages/MessagesGl.php
languages/messages/MessagesHe.php
languages/messages/MessagesHr.php
languages/messages/MessagesHsb.php
languages/messages/MessagesIa.php
languages/messages/MessagesInh.php
languages/messages/MessagesIs.php
languages/messages/MessagesIt.php
languages/messages/MessagesJa.php
languages/messages/MessagesKa.php
languages/messages/MessagesKaa.php
languages/messages/MessagesKsh.php
languages/messages/MessagesKu_latn.php
languages/messages/MessagesLb.php
languages/messages/MessagesLus.php
languages/messages/MessagesLzz.php
languages/messages/MessagesMai.php
languages/messages/MessagesNan.php
languages/messages/MessagesNl.php
languages/messages/MessagesPl.php
languages/messages/MessagesPms.php
languages/messages/MessagesPnb.php
languages/messages/MessagesPt.php
languages/messages/MessagesPt_br.php
languages/messages/MessagesQqq.php
languages/messages/MessagesRo.php
languages/messages/MessagesRoa_tara.php
languages/messages/MessagesRu.php
languages/messages/MessagesRue.php
languages/messages/MessagesSat.php
languages/messages/MessagesSk.php
languages/messages/MessagesSu.php
languages/messages/MessagesTly.php
languages/messages/MessagesTr.php
languages/messages/MessagesVi.php
languages/messages/MessagesVro.php
languages/messages/MessagesYi.php
languages/messages/MessagesZh_hans.php
languages/messages/MessagesZh_hant.php
maintenance/archives/patch-filejournal.sql
maintenance/fileOpPerfTest.php [new file with mode: 0644]
maintenance/language/messages.inc
maintenance/syncFileBackend.php [new file with mode: 0644]
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/IPTest.php
tests/phpunit/includes/LinksUpdateTest.php [new file with mode: 0644]
tests/phpunit/includes/filerepo/FileBackendTest.php
tests/qunit/data/testrunner.js
tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js

index d36f840..8875eeb 100644 (file)
@@ -23,6 +23,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 
 === New features in 1.20 ===
 * Added TitleIsAlwaysKnown hook which gets called when determining if a page exists.
+* Added NamespaceIsMovable hook which gets called when determining if pages in a
+  certain namespace can be moved.
 * (bug 32341) Add upload by URL domain limitation.
 * &useskin=default will now always display the default skin. Useful for users with a
   preference for the non-default skin to look at something using the default skin.
@@ -56,7 +58,11 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 5445) Now remove autoblocks when a user is unblocked.
 * Added $wgLogExceptionBacktrace, on by default, to allow logging of exception
   backtraces.
-* Added device detection for determining device capabilities
+* Added device detection for determining device capabilities.
+* QUnit.newMwEnvironment now supports passing a custom setup and/or teardown function.
+  Arguments signature has changed. First arguments is now an options object of which
+  'config' can be a property. Previously 'config' itself was the first and only argument.
+* New getCreator and getOldestRevision methods added to WikiPage class
 
 === Bug fixes in 1.20 ===
 * (bug 30245) Use the correct way to construct a log page title.
index e9f151c..d298229 100644 (file)
@@ -106,6 +106,7 @@ intelligently:
   mail().
 
 == Updates ==
+
 The correct way for updating a wiki is to update the files and then run from 
 command line the maintenance/update.php script (with appropriate parameters if
 files were moved). It will perform all the needed steps to update the database 
index 33db1c5..8d4bdea 100644 (file)
@@ -1351,6 +1351,11 @@ using this hook.
        BaseTemplate::makeListItem for details on the format of individual
        items inside of this array
 
+'NamespaceIsMovable': Called when determining if it is possible to pages in a namespace.
+$index: Integer; the index of the namespace being checked.
+$result: Boolean; whether MediaWiki currently thinks that pages in this namespace are movable.
+Hooks may change this value to override the return value of MWNamespace::isMovable()
+
 'NewRevisionFromEditComplete': called when a revision was inserted
 due to an edit
 $article: the WikiPage edited
index 0c951b3..de31736 100644 (file)
@@ -58,7 +58,6 @@ $wgAutoloadLocalClasses = array(
        'DerivativeRequest' => 'includes/WebRequest.php',
        'DeviceDetection' => 'includes/DeviceDetection.php',
        'DiffHistoryBlob' => 'includes/HistoryBlob.php',
-
        'DoubleReplacer' => 'includes/StringUtils.php',
        'DummyLinker' => 'includes/Linker.php',
        'Dump7ZipOutput' => 'includes/Export.php',
@@ -145,6 +144,7 @@ $wgAutoloadLocalClasses = array(
        'Linker' => 'includes/Linker.php',
        'LinkFilter' => 'includes/LinkFilter.php',
        'LinksUpdate' => 'includes/LinksUpdate.php',
+       'LinksDeletionUpdate' => 'includes/LinksUpdate.php',
        'LocalisationCache' => 'includes/LocalisationCache.php',
        'LocalisationCache_BulkLoad' => 'includes/LocalisationCache.php',
        'MagicWord' => 'includes/MagicWord.php',
@@ -196,6 +196,8 @@ $wgAutoloadLocalClasses = array(
        'RevisionList' => 'includes/RevisionList.php',
        'RSSFeed' => 'includes/Feed.php',
        'Sanitizer' => 'includes/Sanitizer.php',
+       'DataUpdate' => 'includes/DataUpdate.php',
+       'SqlDataUpdate' => 'includes/SqlDataUpdate.php',
        'ScopedPHPTimeout' => 'includes/ScopedPHPTimeout.php',
        'SiteConfiguration' => 'includes/SiteConfiguration.php',
        'SiteStats' => 'includes/SiteStats.php',
@@ -515,14 +517,17 @@ $wgAutoloadLocalClasses = array(
        'FileBackendStoreShardDirIterator' => 'includes/filerepo/backend/FileBackendStore.php',
        'FileBackendStoreShardFileIterator' => 'includes/filerepo/backend/FileBackendStore.php',
        'FileBackendMultiWrite' => 'includes/filerepo/backend/FileBackendMultiWrite.php',
+       'FileBackendStoreOpHandle' => 'includes/filerepo/backend/FileBackendStore.php',
        'FSFileBackend' => 'includes/filerepo/backend/FSFileBackend.php',
        'FSFileBackendList' => 'includes/filerepo/backend/FSFileBackend.php',
        'FSFileBackendDirList' => 'includes/filerepo/backend/FSFileBackend.php',
        'FSFileBackendFileList' => 'includes/filerepo/backend/FSFileBackend.php',
+       'FSFileOpHandle' => 'includes/filerepo/backend/FSFileBackend.php',
        'SwiftFileBackend' => 'includes/filerepo/backend/SwiftFileBackend.php',
        'SwiftFileBackendList' => 'includes/filerepo/backend/SwiftFileBackend.php',
        'SwiftFileBackendDirList' => 'includes/filerepo/backend/SwiftFileBackend.php',
        'SwiftFileBackendFileList' => 'includes/filerepo/backend/SwiftFileBackend.php',
+       'SwiftFileOpHandle' => 'includes/filerepo/backend/SwiftFileBackend.php',
        'FileJournal' => 'includes/filerepo/backend/filejournal/FileJournal.php',
        'DBFileJournal' => 'includes/filerepo/backend/filejournal/DBFileJournal.php',
        'NullFileJournal' => 'includes/filerepo/backend/filejournal/FileJournal.php',
@@ -535,6 +540,7 @@ $wgAutoloadLocalClasses = array(
        'MySqlLockManager'=> 'includes/filerepo/backend/lockmanager/DBLockManager.php',
        'NullLockManager' => 'includes/filerepo/backend/lockmanager/LockManager.php',
        'FileOp' => 'includes/filerepo/backend/FileOp.php',
+       'FileOpBatch' => 'includes/filerepo/backend/FileOpBatch.php',
        'StoreFileOp' => 'includes/filerepo/backend/FileOp.php',
        'CopyFileOp' => 'includes/filerepo/backend/FileOp.php',
        'MoveFileOp' => 'includes/filerepo/backend/FileOp.php',
@@ -669,6 +675,8 @@ $wgAutoloadLocalClasses = array(
        'HashBagOStuff' => 'includes/objectcache/HashBagOStuff.php',
        'MediaWikiBagOStuff' => 'includes/objectcache/SqlBagOStuff.php',
        'MemCachedClientforWiki' => 'includes/objectcache/MemcachedClient.php',
+       'MemcachedBagOStuff' => 'includes/objectcache/MemcachedBagOStuff.php',
+       'MemcachedPeclBagOStuff' => 'includes/objectcache/MemcachedPeclBagOStuff.php',
        'MemcachedPhpBagOStuff' => 'includes/objectcache/MemcachedPhpBagOStuff.php',
        'MultiWriteBagOStuff' => 'includes/objectcache/MultiWriteBagOStuff.php',
        'MWMemcached' => 'includes/objectcache/MemcachedClient.php',
diff --git a/includes/DataUpdate.php b/includes/DataUpdate.php
new file mode 100644 (file)
index 0000000..07e8223
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+/**
+ * See docs/deferred.txt
+ *
+ * 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
+ *
+ * Abstract base class for update jobs that do something with some secondary
+ * data extracted from article.
+ */
+abstract class DataUpdate implements DeferrableUpdate {
+
+       /**
+        * Constructor
+        */
+       public function __construct( ) {
+               # noop
+       }
+
+       /**
+        * Begin an appropriate transaction, if any.
+        * This default implementation does nothing.
+        */
+       public function beginTransaction() {
+               //noop
+       }
+
+       /**
+        * Commit the transaction started via beginTransaction, if any.
+        * This default implementation does nothing.
+        */
+       public function commitTransaction() {
+               //noop
+       }
+
+       /**
+        * Abort / roll back the transaction started via beginTransaction, if any.
+        * This default implementation does nothing.
+        */
+       public function rollbackTransaction() {
+               //noop
+       }
+
+       /**
+        * Convenience method, calls doUpdate() on every DataUpdate in the array.
+        *
+        * This methods supports transactions logic by first calling beginTransaction()
+        * on all updates in the array, then calling doUpdate() on each, and, if all goes well,
+        * then calling commitTransaction() on each update. If an error occurrs,
+        * rollbackTransaction() will be called on any update object that had beginTranscation()
+        * called but not yet commitTransaction().
+        *
+        * This allows for limited transactional logic across multiple backends for storing
+        * secondary data.
+        *
+        * @static
+        * @param $updates array a list of DataUpdate instances
+        */
+       public static function runUpdates( $updates ) {
+               if ( empty( $updates ) ) return; # nothing to do
+
+               $open_transactions = array();
+               $exception = null;
+
+               /**
+                * @var $update StorageUpdate
+                * @var $trans StorageUpdate
+                */
+
+               try {
+                       // begin transactions
+                       foreach ( $updates as $update ) {
+                               $update->beginTransaction();
+                               $open_transactions[] = $update;
+                       }
+
+                       // do work
+                       foreach ( $updates as $update ) {
+                               $update->doUpdate();
+                       }
+
+                       // commit transactions
+                       while ( count( $open_transactions ) > 0 ) {
+                               $trans = array_pop( $open_transactions );
+                               $trans->commitTransaction();
+                       }
+               } catch ( Exception $ex ) {
+                       $exception = $ex;
+                       wfDebug( "Caught exception, will rethrow after rollback: " . $ex->getMessage() );
+               }
+
+               // rollback remaining transactions
+               while ( count( $open_transactions ) > 0 ) {
+                       $trans = array_pop( $open_transactions );
+                       $trans->rollbackTransaction();
+               }
+
+               if ( $exception ) {
+                       throw $exception; // rethrow after cleanup
+               }
+       }
+
+}
index c210662..2bb7523 100644 (file)
@@ -1592,6 +1592,7 @@ $wgObjectCaches = array(
        'xcache' => array( 'class' => 'XCacheBagOStuff' ),
        'wincache' => array( 'class' => 'WinCacheBagOStuff' ),
        'memcached-php' => array( 'class' => 'MemcachedPhpBagOStuff' ),
+       'memcached-pecl' => array( 'class' => 'MemcachedPeclBagOStuff' ),
        'hash' => array( 'class' => 'HashBagOStuff' ),
 );
 
index f7b6b96..a1e3f12 100644 (file)
@@ -462,7 +462,7 @@ class HttpError extends MWException {
                $this->content = $content;
        }
 
-       public function reportHTML() {
+       public function report() {
                $httpMessage = HttpStatus::getMessage( $this->httpCode );
 
                header( "Status: {$this->httpCode} {$httpMessage}" );
index ea6fd94..c201c97 100644 (file)
@@ -338,7 +338,7 @@ class WikiExporter {
                        } elseif ( $this->history & WikiExporter::RANGE ) {
                                # Dump of revisions within a specified range
                                $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
-                               $opts['ORDER BY'] = 'rev_page ASC, rev_id ASC';
+                               $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' );
                        } else {
                                # Uknown history specification parameter?
                                wfProfileOut( __METHOD__ );
index 23b47a9..369c1ee 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/**
+ * Fake title class that triggers an error if any members are called.
+ *
+ * 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
+ */
 
 /**
  * Fake title class that triggers an error if any members are called
index b517cd1..4b138c1 100644 (file)
@@ -1,6 +1,7 @@
 <?php
-
 /**
+ * Fallback functions for PHP installed without mbstring 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
@@ -16,6 +17,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  */
 
 /**
index d280db5..1c5e777 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Helper functions for feeds.
+ *
+ * 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 Feed
+ */
 
 /**
  * Helper functions for feeds
index d86c8d8..9d6ab65 100644 (file)
@@ -1,10 +1,31 @@
 <?php
+/**
+ * File deletion user 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
+ * @author Rob Church <robchur@gmail.com>
+ * @ingroup Media
+ */
 
 /**
  * File deletion user interface
  *
  * @ingroup Media
- * @author Rob Church <robchur@gmail.com>
  */
 class FileDeleteForm {
 
index 569d836..448bc03 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/**
+ * Class for managing forking command line scripts.
+ *
+ * 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 managing forking command line scripts.
index d1a5fd3..33bbd86 100644 (file)
@@ -1,16 +1,35 @@
 <?php
 /**
  * Helper class to keep track of options when mixing links and form elements.
- * @todo This badly need some examples and tests :-)
  *
  * Copyright © 2008, Niklas Laxstiröm
- *
  * Copyright © 2011, Antoine Musso
  *
+ * 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 Niklas Laxström
  * @author Antoine Musso 
  */
 
+/**
+ * Helper class to keep track of options when mixing links and form elements.
+ *
+ * @todo This badly need some examples and tests :-)
+ */
 class FormOptions implements ArrayAccess {
        /** @name Type constants
         * Used internally to map an option value to a WebRequest accessor
index e1b0379..c3c3073 100644 (file)
@@ -5,6 +5,21 @@
  * of anyone working on large branches in git to setup config that show up only
  * when specific branches are currently checked 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
  */
 
index cea7e48..7aec2e2 100644 (file)
@@ -1,6 +1,22 @@
 <?php
 /**
- * Global functions used everywhere
+ * Global functions used everywhere.
+ *
+ * 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
  */
 
index 029ed05..e56ca2e 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * HTML form generation and submission 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
+ */
+
 /**
  * Object handling generic submission, CSRF protection, layout and
  * other logic for UI forms. in a reusable manner.
index 9e63791..bb8ec5e 100644 (file)
@@ -1,5 +1,25 @@
 <?php
-
+/**
+ * Efficient concatenated text storage.
+ *
+ * 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
+ */
 /**
  * Base class for general text storage via the "object" flag in old_flags, or 
  * two-part external storage URLs. Used for represent efficient concatenated 
index 479b4d2..feb9b93 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Class alias kept for backward compatibility.
+ *
+ * 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
+ */
 
 /**
  * HttpRequest was renamed to MWHttpRequest in order
index 5b75088..fbae861 100644 (file)
@@ -1,4 +1,26 @@
 <?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
  */
index e1c1f6d..1828249 100644 (file)
@@ -133,7 +133,7 @@ class IP {
        }
 
        /**
-        * Convert an IP into a nice standard form.
+        * Convert an IP into a verbose, uppercase, normalized form.
         * IPv6 addresses in octet notation are expanded to 8 words.
         * IPv4 addresses are just trimmed.
         *
@@ -185,6 +185,49 @@ class IP {
                return $ip;
        }
 
+       /**
+        * Prettify an IP for display to end users.
+        * This will make it more compact and lower-case.
+        *
+        * @param $ip string
+        * @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 ) = array( $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
index fc3bdff..3fbbcba 100644 (file)
@@ -96,7 +96,7 @@ class ImagePage extends Article {
         * Include body text only; none of the image extras
         */
        public function render() {
-               $this->getContext()->setArticleBodyOnly( true );
+               $this->getContext()->getOutput()->setArticleBodyOnly( true );
                parent::view();
        }
 
index 4518421..8b403fc 100644 (file)
  *
  * @todo document (e.g. one-sentence top-level class description).
  */
-class LinksUpdate {
+class LinksUpdate extends SqlDataUpdate {
 
-       /**@{{
-        * @private
-        */
-       var $mId,            //!< Page ID of the article linked from
+       // @todo: make members protected, but make sure extensions don't break
+
+       public $mId,         //!< Page ID of the article linked from
                $mTitle,         //!< Title object of the article linked from
                $mParserOutput,  //!< Parser output
                $mLinks,         //!< Map of title strings to IDs for the links in the document
@@ -43,7 +42,6 @@ class LinksUpdate {
                $mDb,            //!< Database connection reference
                $mOptions,       //!< SELECT options to be used (array)
                $mRecursive;     //!< Whether to queue jobs for recursive updates
-       /**@}}*/
 
        /**
         * Constructor
@@ -53,19 +51,18 @@ class LinksUpdate {
         * @param $recursive Boolean: queue jobs for recursive updates?
         */
        function __construct( $title, $parserOutput, $recursive = true ) {
-               global $wgAntiLockFlags;
+               parent::__construct( );
 
-               if ( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) {
-                       $this->mOptions = array();
-               } else {
-                       $this->mOptions = array( 'FOR UPDATE' );
+               if ( !( $title instanceof Title ) ) {
+                       throw new MWException( "The calling convention to LinksUpdate::LinksUpdate() has changed. " .
+                               "Please see Article::editUpdates() for an invocation example.\n" );
                }
-               $this->mDb = wfGetDB( DB_MASTER );
 
-               if ( !is_object( $title ) ) {
+               if ( !( $parserOutput instanceof ParserOutput ) ) {
                        throw new MWException( "The calling convention to LinksUpdate::__construct() has changed. " .
                                "Please see WikiPage::doEditUpdates() for an invocation example.\n" );
                }
+
                $this->mTitle = $title;
                $this->mId = $title->getArticleID();
 
@@ -259,51 +256,6 @@ class LinksUpdate {
                wfProfileOut( __METHOD__ );
        }
 
-       /**
-        * Invalidate the cache of a list of pages from a single namespace
-        *
-        * @param $namespace Integer
-        * @param $dbkeys Array
-        */
-       function invalidatePages( $namespace, $dbkeys ) {
-               if ( !count( $dbkeys ) ) {
-                       return;
-               }
-
-               /**
-                * 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 = $this->mDb->timestamp();
-               $ids = array();
-               $res = $this->mDb->select( 'page', array( 'page_id' ),
-                       array(
-                               'page_namespace' => $namespace,
-                               'page_title IN (' . $this->mDb->makeList( $dbkeys ) . ')',
-                               'page_touched < ' . $this->mDb->addQuotes( $now )
-                       ), __METHOD__
-               );
-               foreach ( $res as $row ) {
-                       $ids[] = $row->page_id;
-               }
-               if ( !count( $ids ) ) {
-                       return;
-               }
-
-               /**
-                * Do the update
-                * We still need the page_touched condition, in case the row has changed since
-                * the non-locking select above.
-                */
-               $this->mDb->update( 'page', array( 'page_touched' => $now ),
-                       array(
-                               'page_id IN (' . $this->mDb->makeList( $ids ) . ')',
-                               'page_touched < ' . $this->mDb->addQuotes( $now )
-                       ), __METHOD__
-               );
-       }
-
        /**
         * @param $cats
         */
@@ -855,3 +807,74 @@ class LinksUpdate {
                }
        }
 }
+
+/**
+ * Update object handling the cleanup of links tables after a page was deleted.
+ **/
+class LinksDeletionUpdate extends SqlDataUpdate {
+
+       protected $mPage;     //!< WikiPage the wikipage that was deleted
+
+       /**
+        * Constructor
+        *
+        * @param $title Title of the page we're updating
+        * @param $parserOutput ParserOutput: output from a full parse of this page
+        * @param $recursive Boolean: queue jobs for recursive updates?
+        */
+       function __construct( WikiPage $page ) {
+               parent::__construct( );
+
+               $this->mPage = $page;
+       }
+
+       /**
+        * Do some database updates after deletion
+        */
+       public function doUpdate() {
+               $title = $this->mPage->getTitle();
+               $id = $this->mPage->getId();
+
+               # Delete restrictions for it
+               $this->mDb->delete( 'page_restrictions', array ( 'pr_page' => $id ), __METHOD__ );
+
+               # Fix category table counts
+               $cats = array();
+               $res = $this->mDb->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ );
+
+               foreach ( $res as $row ) {
+                       $cats [] = $row->cl_to;
+               }
+
+               $this->mPage->updateCategoryCounts( array(), $cats );
+
+               # If using cascading deletes, we can skip some explicit deletes
+               if ( !$this->mDb->cascadingDeletes() ) {
+                       $this->mDb->delete( 'revision', array( 'rev_page' => $id ), __METHOD__ );
+
+                       # Delete outgoing links
+                       $this->mDb->delete( 'pagelinks', array( 'pl_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'imagelinks', array( 'il_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'categorylinks', array( 'cl_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'templatelinks', array( 'tl_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'externallinks', array( 'el_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'langlinks', array( 'll_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'iwlinks', array( 'iwl_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'redirect', array( 'rd_from' => $id ), __METHOD__ );
+                       $this->mDb->delete( 'page_props', array( 'pp_page' => $id ), __METHOD__ );
+               }
+
+               # If using cleanup triggers, we can skip some manual deletes
+               if ( !$this->mDb->cleanupTriggers() ) {
+                       # Clean up recentchanges entries...
+                       $this->mDb->delete( 'recentchanges',
+                               array( 'rc_type != ' . RC_LOG,
+                                       'rc_namespace' => $title->getNamespace(),
+                                       'rc_title' => $title->getDBkey() ),
+                               __METHOD__ );
+                       $this->mDb->delete( 'recentchanges',
+                               array( 'rc_type != ' . RC_LOG, 'rc_cur_id' => $id ),
+                               __METHOD__ );
+               }
+       }
+}
index a275123..c87a12b 100644 (file)
@@ -65,7 +65,15 @@ class MWNamespace {
         */
        public static function isMovable( $index ) {
                global $wgAllowImageMoving;
-               return !( $index < NS_MAIN || ( $index == NS_FILE && !$wgAllowImageMoving )  || $index == NS_CATEGORY );
+
+               $result = !( $index < NS_MAIN || ( $index == NS_FILE && !$wgAllowImageMoving )  || $index == NS_CATEGORY );
+
+               /**
+                * @since 1.20
+                */
+               wfRunHooks( 'NamespaceIsMovable', array( $index, &$result ) );
+
+               return $result;
        }
 
        /**
index f0f1876..438a99a 100644 (file)
@@ -313,14 +313,14 @@ abstract class IndexPager extends ContextSource implements Pager {
                $join_conds = isset( $info['join_conds'] ) ? $info['join_conds'] : array();
                $sortColumns = array_merge( array( $this->mIndexField ), $this->mExtraSortFields );
                if ( $descending ) {
-                       $options['ORDER BY'] = implode( ',', $sortColumns );
+                       $options['ORDER BY'] = $sortColumns;
                        $operator = '>';
                } else {
                        $orderBy = array();
                        foreach ( $sortColumns as $col ) {
                                $orderBy[] = $col . ' DESC';
                        }
-                       $options['ORDER BY'] = implode( ',', $orderBy );
+                       $options['ORDER BY'] = $orderBy;
                        $operator = '<';
                }
                if ( $offset != '' ) {
index f28aeee..1c42b1c 100644 (file)
@@ -376,7 +376,7 @@ abstract class QueryPage extends SpecialPage {
                        $options = isset( $query['options'] ) ? (array)$query['options'] : array();
                        $join_conds = isset( $query['join_conds'] ) ? (array)$query['join_conds'] : array();
                        if ( count( $order ) ) {
-                               $options['ORDER BY'] = implode( ', ', $order );
+                               $options['ORDER BY'] = $order;
                        }
                        if ( $limit !== false ) {
                                $options['LIMIT'] = intval( $limit );
diff --git a/includes/SqlDataUpdate.php b/includes/SqlDataUpdate.php
new file mode 100644 (file)
index 0000000..f0204df
--- /dev/null
@@ -0,0 +1,127 @@
+<?php
+/**
+ * See docs/deferred.txt
+ *
+ * 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
+ *
+ * Abstract base class for update jobs that put some secondary data extracted
+ * from article content into the database.
+ */
+abstract class SqlDataUpdate extends DataUpdate {
+
+       protected $mDb;            //!< Database connection reference
+       protected $mOptions;       //!< SELECT options to be used (array)
+
+       private   $mHasTransaction; //!< bool whether a transaction is open on this object (internal use only!)
+
+       /**
+        * Constructor
+       **/
+       public function __construct( ) {
+               global $wgAntiLockFlags;
+
+               parent::__construct( );
+
+               if ( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) {
+                       $this->mOptions = array();
+               } else {
+                       $this->mOptions = array( 'FOR UPDATE' );
+               }
+
+               // @todo: get connection only when it's needed? make sure that doesn't break anything, especially transactions!
+               $this->mDb = wfGetDB( DB_MASTER );
+               $this->mHasTransaction = false;
+       }
+
+       /**
+        * Begin a database transaction.
+        *
+        * Because nested transactions are not supportred by the Database class, this implementation
+        * checkes Database::trxLevel() and only opens a transaction if none is yet active.
+        */
+       public function beginTransaction() {
+               // NOTE: nested transactions are not supported, only start a transaction if none is open
+               if ( $this->mDb->trxLevel() === 0 ) {
+                       $this->mDb->begin( get_class( $this ) . '::beginTransaction'  );
+                       $this->mHasTransaction = true;
+               }
+       }
+
+       /**
+        * Commit the database transaction started via beginTransaction (if any).
+        */
+       public function commitTransaction() {
+               if ( $this->mHasTransaction ) {
+                       $this->mDb->commit( get_class( $this ) . '::commitTransaction' );
+               }
+       }
+
+       /**
+        * Abort the database transaction started via beginTransaction (if any).
+        */
+       public function abortTransaction() {
+               if ( $this->mHasTransaction ) {
+                       $this->mDb->rollback( get_class( $this ) . '::abortTransaction' );
+               }
+       }
+
+       /**
+        * Invalidate the cache of a list of pages from a single namespace.
+        * This is intended for use by subclasses.
+        *
+        * @param $namespace Integer
+        * @param $dbkeys Array
+        */
+       protected function invalidatePages( $namespace, Array $dbkeys ) {
+               if ( !count( $dbkeys ) ) {
+                       return;
+               }
+
+               /**
+                * 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 = $this->mDb->timestamp();
+               $ids = array();
+               $res = $this->mDb->select( 'page', array( 'page_id' ),
+                       array(
+                               'page_namespace' => $namespace,
+                               'page_title' => $dbkeys,
+                               'page_touched < ' . $this->mDb->addQuotes( $now )
+                       ), __METHOD__
+               );
+               foreach ( $res as $row ) {
+                       $ids[] = $row->page_id;
+               }
+               if ( !count( $ids ) ) {
+                       return;
+               }
+
+               /**
+                * Do the update
+                * We still need the page_touched condition, in case the row has changed since
+                * the non-locking select above.
+                */
+               $this->mDb->update( 'page', array( 'page_touched' => $now ),
+                       array(
+                               'page_id' => $ids,
+                               'page_touched < ' . $this->mDb->addQuotes( $now )
+                       ), __METHOD__
+               );
+       }
+
+}
index 4f0a897..cf428f9 100644 (file)
@@ -2555,7 +2555,10 @@ class Title {
                                        $this->mRestrictions['edit'] = explode( ',', trim( $temp[0] ) );
                                        $this->mRestrictions['move'] = explode( ',', trim( $temp[0] ) );
                                } else {
-                                       $this->mRestrictions[$temp[0]] = explode( ',', trim( $temp[1] ) );
+                                       $restriction = trim( $temp[1] );
+                                       if( $restriction != '' ) { //some old entries are empty
+                                               $this->mRestrictions[$temp[0]] = explode( ',', $restriction );
+                                       }
                                }
                        }
 
index cb146b5..5de4b2c 100644 (file)
@@ -1287,7 +1287,7 @@ class User {
 
                # Proxy blocking
                if ( !$block instanceof Block && $ip !== null && !$this->isAllowed( 'proxyunbannable' )
-                       && !in_array( $ip, $wgProxyWhitelist ) ) 
+                       && !in_array( $ip, $wgProxyWhitelist ) )
                {
                        # Local list
                        if ( self::isLocallyBlockedProxy( $ip ) ) {
@@ -1926,10 +1926,19 @@ class User {
                        $this->mTouched = self::newTouchedTimestamp();
 
                        $dbw = wfGetDB( DB_MASTER );
-                       $dbw->update( 'user',
-                               array( 'user_touched' => $dbw->timestamp( $this->mTouched ) ),
-                               array( 'user_id' => $this->mId ),
-                               __METHOD__ );
+
+                       // Prevent contention slams by checking user_touched first
+                       $now = $dbw->timestamp( $this->mTouched );
+                       $needsPurge = $dbw->selectField( 'user', '1',
+                               array( 'user_id' => $this->mId, 'user_touched < ' . $dbw->addQuotes( $now ) )
+                       );
+                       if ( $needsPurge ) {
+                               $dbw->update( 'user',
+                                       array( 'user_touched' => $now ),
+                                       array( 'user_id' => $this->mId, 'user_touched < ' . $dbw->addQuotes( $now ) ),
+                                       __METHOD__
+                               );
+                       }
 
                        $this->clearSharedCache();
                }
@@ -3014,7 +3023,7 @@ class User {
         */
        public function getPageRenderingHash() {
                wfDeprecated( __METHOD__, '1.17' );
-               
+
                global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
                if( $this->mHash ){
                        return $this->mHash;
index 8e9b0a0..b326eb4 100644 (file)
@@ -1761,9 +1761,9 @@ class WikiPage extends Page {
                        $parserCache->save( $editInfo->output, $this, $editInfo->popts );
                }
 
-               # Update the links tables
-               $u = new LinksUpdate( $this->mTitle, $editInfo->output );
-               $u->doUpdate();
+               # Update the links tables and other secondary data
+               $updates = $editInfo->output->getSecondaryDataUpdates( $this->mTitle );
+               DataUpdate::runUpdates( $updates );
 
                wfRunHooks( 'ArticleEditUpdates', array( &$this, &$editInfo, $options['changed'] ) );
 
@@ -2225,7 +2225,21 @@ class WikiPage extends Page {
                        return WikiPage::DELETE_NO_REVISIONS;
                }
 
-               $this->doDeleteUpdates( $id );
+               # update site status
+               DeferredUpdates::addUpdate( new SiteStatsUpdate( 0, 1, - (int)$this->isCountable(), -1 ) );
+
+               # remove secondary indexes, etc
+               $updates = $this->getDeletionUpdates( );
+               DataUpdate::runUpdates( $updates );
+
+               # Clear caches
+               WikiPage::onArticleDelete( $this->mTitle );
+
+               # Reset this object
+               $this->clear();
+
+               # Clear the cached article id so the interface doesn't act like we exist
+               $this->mTitle->resetArticleID( 0 );
 
                # Log the deletion, if the page was suppressed, log it at Oversight instead
                $logtype = $suppress ? 'suppress' : 'delete';
@@ -2245,68 +2259,6 @@ class WikiPage extends Page {
                return WikiPage::DELETE_SUCCESS;
        }
 
-       /**
-        * Do some database updates after deletion
-        *
-        * @param $id Int: page_id value of the page being deleted
-        */
-       public function doDeleteUpdates( $id ) {
-               DeferredUpdates::addUpdate( new SiteStatsUpdate( 0, 1, - (int)$this->isCountable(), -1 ) );
-
-               $dbw = wfGetDB( DB_MASTER );
-
-               # Delete restrictions for it
-               $dbw->delete( 'page_restrictions', array ( 'pr_page' => $id ), __METHOD__ );
-
-               # Fix category table counts
-               $cats = array();
-               $res = $dbw->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ );
-
-               foreach ( $res as $row ) {
-                       $cats [] = $row->cl_to;
-               }
-
-               $this->updateCategoryCounts( array(), $cats );
-
-               # If using cascading deletes, we can skip some explicit deletes
-               if ( !$dbw->cascadingDeletes() ) {
-                       $dbw->delete( 'revision', array( 'rev_page' => $id ), __METHOD__ );
-
-                       # Delete outgoing links
-                       $dbw->delete( 'pagelinks', array( 'pl_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'imagelinks', array( 'il_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'categorylinks', array( 'cl_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'templatelinks', array( 'tl_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'externallinks', array( 'el_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'langlinks', array( 'll_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'iwlinks', array( 'iwl_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'redirect', array( 'rd_from' => $id ), __METHOD__ );
-                       $dbw->delete( 'page_props', array( 'pp_page' => $id ), __METHOD__ );
-               }
-
-               # If using cleanup triggers, we can skip some manual deletes
-               if ( !$dbw->cleanupTriggers() ) {
-                       # Clean up recentchanges entries...
-                       $dbw->delete( 'recentchanges',
-                               array( 'rc_type != ' . RC_LOG,
-                                       'rc_namespace' => $this->mTitle->getNamespace(),
-                                       'rc_title' => $this->mTitle->getDBkey() ),
-                               __METHOD__ );
-                       $dbw->delete( 'recentchanges',
-                               array( 'rc_type != ' . RC_LOG, 'rc_cur_id' => $id ),
-                               __METHOD__ );
-               }
-
-               # Clear caches
-               self::onArticleDelete( $this->mTitle );
-
-               # Reset this object
-               $this->clear();
-
-               # Clear the cached article id so the interface doesn't act like we exist
-               $this->mTitle->resetArticleID( 0 );
-       }
-
        /**
         * Roll back the most recent consecutive set of edits to a page
         * from the same user; fails if there are no eligible edits to
@@ -2875,6 +2827,7 @@ class WikiPage extends Page {
 
                if ( count( $templates_diff ) > 0 ) {
                        # Whee, link updates time.
+                       # Note: we are only interested in links here. We don't need to get other DataUpdate items from the parser output.
                        $u = new LinksUpdate( $this->mTitle, $parserOutput, false );
                        $u->doUpdate();
                }
@@ -3003,6 +2956,16 @@ class WikiPage extends Page {
                global $wgUser;
                return $this->isParserCacheUsed( ParserOptions::newFromUser( $wgUser ), $oldid );
        }
+
+       public function getDeletionUpdates() {
+               $updates = array(
+                       new LinksDeletionUpdate( $this ),
+               );
+
+               //@todo: make a hook to add update objects
+               //NOTE: deletion updates will be determined by the ContentHandler in the future
+               return $updates;
+       }
 }
 
 class PoolWorkArticleView extends PoolCounterWork {
index 10540a3..7414a97 100644 (file)
@@ -715,6 +715,9 @@ class ApiMain extends ApiBase {
                $module->profileOut();
 
                if ( !$this->mInternalMode ) {
+                       //append Debug information
+                       MWDebug::appendDebugInfoToApiResult( $this->getContext(), $this->getResult() );
+
                        // Print result data
                        $this->printResult( false );
                }
index b803fd4..8ef9cbc 100644 (file)
@@ -94,8 +94,8 @@ class ApiPurge extends ApiBase {
                                                true, true, $page->getLatest() );
 
                                        # Update the links tables
-                                       $u = new LinksUpdate( $title, $p_result );
-                                       $u->doUpdate();
+                                       $updates = $p_result->getSecondaryDataUpdates( $title );
+                                       DataUpdate::runUpdates( $updates );
 
                                        $r['linkupdate'] = '';
 
index 7390546..426de6c 100644 (file)
@@ -224,6 +224,13 @@ class ApiQueryRevisions extends ApiQueryBase {
                        }
                }
 
+               // add user name, if needed
+               if ( $this->fld_user ) {
+                       $this->addTables( 'user' );
+                       $this->addJoinConds( array( 'user' => Revision::userJoinCond() ) );
+                       $this->addFields( Revision::selectUserFields() );
+               }
+
                // Bug 24166 - API error when using rvprop=tags
                $this->addTables( 'revision' );
 
index ed73522..211f74a 100644 (file)
@@ -27,6 +27,8 @@
  * to explicitly call MWDebug::init() to enabled them.
  *
  * @todo Profiler support
+ *
+ * @since 1.19
  */
 class MWDebug {
 
@@ -69,6 +71,8 @@ class MWDebug {
        /**
         * Enabled the debugger and load resource module.
         * This is called by Setup.php when $wgDebugToolbar is true.
+        *
+        * @since 1.19
         */
        public static function init() {
                self::$enabled = true;
@@ -78,6 +82,7 @@ class MWDebug {
         * Add ResourceLoader modules to the OutputPage object if debugging is
         * enabled.
         *
+        * @since 1.19
         * @param $out OutputPage
         */
        public static function addModules( OutputPage $out ) {
@@ -91,6 +96,7 @@ class MWDebug {
         *
         * @todo Add support for passing objects
         *
+        * @since 1.19
         * @param $str string
         */
        public static function log( $str ) {
@@ -107,6 +113,7 @@ class MWDebug {
 
        /**
         * Returns internal log array
+        * @since 1.19
         * @return array
         */
        public static function getLog() {
@@ -115,6 +122,7 @@ class MWDebug {
 
        /**
         * Clears internal log array and deprecation tracking
+        * @since 1.19
         */
        public static function clearLog() {
                self::$log = array();
@@ -124,6 +132,7 @@ class MWDebug {
        /**
         * Adds a warning entry to the log
         *
+        * @since 1.19
         * @param $msg
         * @param int $callerOffset
         * @return mixed
@@ -153,6 +162,7 @@ class MWDebug {
        /**
         * Adds a depreciation entry to the log, along with a backtrace
         *
+        * @since 1.19
         * @param $function
         * @param $version
         * @param $component
@@ -192,6 +202,7 @@ class MWDebug {
         * This is a method to pass messages from wfDebug to the pretty debugger.
         * Do NOT use this method, use MWDebug::log or wfDebug()
         *
+        * @since 1.19
         * @param $str string
         */
        public static function debugMsg( $str ) {
@@ -205,6 +216,7 @@ class MWDebug {
        /**
         * Begins profiling on a database query
         *
+        * @since 1.19
         * @param $sql string
         * @param $function string
         * @param $isMaster bool
@@ -230,6 +242,7 @@ class MWDebug {
        /**
         * Calculates how long a query took.
         *
+        * @since 1.19
         * @param $id int
         */
        public static function queryTime( $id ) {
@@ -264,6 +277,7 @@ class MWDebug {
        /**
         * Returns the HTML to add to the page for the toolbar
         *
+        * @since 1.19
         * @param $context IContextSource
         * @return string
         */
@@ -272,10 +286,61 @@ class MWDebug {
                        return '';
                }
 
-               global $wgVersion, $wgRequestTime;
                MWDebug::log( 'MWDebug output complete' );
+               $debugInfo = self::getDebugInfo( $context );
+
+               // Cannot use OutputPage::addJsConfigVars because those are already outputted
+               // by the time this method is called.
+               $html = Html::inlineScript(
+                       ResourceLoader::makeLoaderConditionalScript(
+                               ResourceLoader::makeConfigSetScript( array( 'debugInfo' => $debugInfo ) )
+                       )
+               );
+
+               return $html;
+       }
+
+       /**
+        * Append the debug info to given ApiResult
+        *
+        * @param $context IContextSource
+        * @param $result ApiResult
+        */
+       public static function appendDebugInfoToApiResult( IContextSource $context, ApiResult $result ) {
+               if ( !self::$enabled ) {
+                       return;
+               }
+
+               MWDebug::log( 'MWDebug output complete' );
+               $debugInfo = self::getDebugInfo( $context );
+
+               $result->setIndexedTagName( $debugInfo, 'debuginfo' );
+               $result->setIndexedTagName( $debugInfo['log'], 'line' );
+               foreach( $debugInfo['debugLog'] as $index => $debugLogText ) {
+                       $vals = array();
+                       ApiResult::setContent( $vals, $debugLogText );
+                       $debugInfo['debugLog'][$index] = $vals; //replace
+               }
+               $result->setIndexedTagName( $debugInfo['debugLog'], 'msg' );
+               $result->setIndexedTagName( $debugInfo['queries'], 'query' );
+               $result->setIndexedTagName( $debugInfo['includes'], 'queries' );
+               $result->addValue( array(), 'debuginfo', $debugInfo );
+       }
+
+       /**
+        * Returns the HTML to add to the page for the toolbar
+        *
+        * @param $context IContextSource
+        * @return array
+        */
+       public static function getDebugInfo( IContextSource $context ) {
+               if ( !self::$enabled ) {
+                       return array();
+               }
+
+               global $wgVersion, $wgRequestTime;
                $request = $context->getRequest();
-               $debugInfo = array(
+               return array(
                        'mwVersion' => $wgVersion,
                        'phpVersion' => PHP_VERSION,
                        'gitRevision' => GitInfo::headSHA1(),
@@ -295,15 +360,5 @@ class MWDebug {
                        'memoryPeak' => $context->getLanguage()->formatSize( memory_get_peak_usage() ),
                        'includes' => self::getFilesIncluded( $context ),
                );
-
-               // Cannot use OutputPage::addJsConfigVars because those are already outputted
-               // by the time this method is called.
-               $html = Html::inlineScript(
-                       ResourceLoader::makeLoaderConditionalScript(
-                               ResourceLoader::makeConfigSetScript( array( 'debugInfo' => $debugInfo ) )
-                       )
-               );
-
-               return $html;
        }
 }
index 6533dae..d3dded4 100644 (file)
@@ -852,14 +852,11 @@ class FileRepo {
                        $operations[] = array(
                                'op'        => 'store',
                                'src'       => $src,
-                               'dst'       => $this->resolveToStoragePath( $dst ),
-                               'overwrite' => true
+                               'dst'       => $this->resolveToStoragePath( $dst )
                        );
                        $this->backend->prepare( array( 'dir' => dirname( $dst ) ) );
                }
-               $status->merge( $this->backend->doOperations( $operations,
-                       array( 'force' => 1, 'nonLocking' => 1, 'allowStale' => 1, 'nonJournaled' => 1 )
-               ) );
+               $status->merge( $this->backend->doQuickOperations( $operations ) );
 
                return $status;
        }
@@ -882,9 +879,7 @@ class FileRepo {
                                'ignoreMissingSource' => true
                        );
                }
-               $status->merge( $this->backend->doOperations( $operations,
-                       array( 'force' => 1, 'nonLocking' => 1, 'allowStale' => 1, 'nonJournaled' => 1 )
-               ) );
+               $status->merge( $this->backend->doQuickOperations( $operations ) );
 
                return $status;
        }
index d9a9c59..e105730 100644 (file)
@@ -191,22 +191,39 @@ class FSFileBackend extends FileBackendStore {
                        }
                }
 
-               $ok = copy( $params['src'], $dest );
-               // 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." );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', array( wfIsWindows() ? 'COPY' : 'cp',
+                               wfEscapeShellArg( $this->cleanPathSlashes( $params['src'] ) ),
+                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
+                       ) );
+                       $status->value = new FSFileOpHandle( $this, $params, 'Store', $cmd, $dest );
+               } else { // immediate write
+                       $ok = copy( $params['src'], $dest );
+                       // 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;
                        }
-                       $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
-                       return $status;
+                       $this->chmod( $dest );
                }
 
-               $this->chmod( $dest );
-
                return $status;
        }
 
+       /**
+        * @see FSFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseStore( $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
+               }
+       }
+
        /**
         * @see FileBackendStore::doCopyInternal()
         * @return Status
@@ -239,22 +256,39 @@ class FSFileBackend extends FileBackendStore {
                        }
                }
 
-               $ok = copy( $source, $dest );
-               // In some cases (at least over NFS), copy() returns true when it fails.
-               if ( !$ok || ( filesize( $source ) !== filesize( $dest ) ) ) {
-                       if ( $ok ) { // PHP bug
-                               unlink( $dest ); // remove broken file
-                               trigger_error( __METHOD__ . ": copy() failed but returned true." );
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', array( wfIsWindows() ? 'COPY' : 'cp',
+                               wfEscapeShellArg( $this->cleanPathSlashes( $source ) ),
+                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
+                       ) );
+                       $status->value = new FSFileOpHandle( $this, $params, 'Copy', $cmd, $dest );
+               } else { // immediate write
+                       $ok = copy( $source, $dest );
+                       // In some cases (at least over NFS), copy() returns true when it fails
+                       if ( !$ok || ( filesize( $source ) !== filesize( $dest ) ) ) {
+                               if ( $ok ) { // PHP bug
+                                       unlink( $dest ); // remove broken file
+                                       trigger_error( __METHOD__ . ": copy() failed but returned true." );
+                               }
+                               $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                               return $status;
                        }
-                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-                       return $status;
+                       $this->chmod( $dest );
                }
 
-               $this->chmod( $dest );
-
                return $status;
        }
 
+       /**
+        * @see FSFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseCopy( $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
+               }
+       }
+
        /**
         * @see FileBackendStore::doMoveInternal()
         * @return Status
@@ -290,16 +324,34 @@ class FSFileBackend extends FileBackendStore {
                        }
                }
 
-               $ok = rename( $source, $dest );
-               clearstatcache(); // file no longer at source
-               if ( !$ok ) {
-                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
-                       return $status;
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', array( wfIsWindows() ? 'MOVE' : 'mv',
+                               wfEscapeShellArg( $this->cleanPathSlashes( $source ) ),
+                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
+                       ) );
+                       $status->value = new FSFileOpHandle( $this, $params, 'Move', $cmd );
+               } else { // immediate write
+                       $ok = rename( $source, $dest );
+                       clearstatcache(); // file no longer at source
+                       if ( !$ok ) {
+                               $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+                               return $status;
+                       }
                }
 
                return $status;
        }
 
+       /**
+        * @see FSFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseMove( $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
+               }
+       }
+
        /**
         * @see FileBackendStore::doDeleteInternal()
         * @return Status
@@ -320,15 +372,32 @@ class FSFileBackend extends FileBackendStore {
                        return $status; // do nothing; either OK or bad status
                }
 
-               $ok = unlink( $source );
-               if ( !$ok ) {
-                       $status->fatal( 'backend-fail-delete', $params['src'] );
-                       return $status;
+               if ( !empty( $params['async'] ) ) { // deferred
+                       $cmd = implode( ' ', array( wfIsWindows() ? 'DEL' : 'unlink',
+                               wfEscapeShellArg( $this->cleanPathSlashes( $source ) )
+                       ) );
+                       $status->value = new FSFileOpHandle( $this, $params, 'Copy', $cmd );
+               } else { // immediate write
+                       $ok = unlink( $source );
+                       if ( !$ok ) {
+                               $status->fatal( 'backend-fail-delete', $params['src'] );
+                               return $status;
+                       }
                }
 
                return $status;
        }
 
+       /**
+        * @see FSFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseDelete( $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
+               }
+       }
+
        /**
         * @see FileBackendStore::doCreateInternal()
         * @return Status
@@ -355,17 +424,45 @@ class FSFileBackend extends FileBackendStore {
                        }
                }
 
-               $bytes = file_put_contents( $dest, $params['content'] );
-               if ( $bytes === false ) {
-                       $status->fatal( 'backend-fail-create', $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;
+                       }
+                       $bytes = file_put_contents( $tempFile->getPath(), $params['content'] );
+                       if ( $bytes === false ) {
+                               $status->fatal( 'backend-fail-create', $params['dst'] );
+                               return $status;
+                       }
+                       $cmd = implode( ' ', array( wfIsWindows() ? 'COPY' : 'cp',
+                               wfEscapeShellArg( $this->cleanPathSlashes( $tempFile->getPath() ) ),
+                               wfEscapeShellArg( $this->cleanPathSlashes( $dest ) )
+                       ) );
+                       $status->value = new FSFileOpHandle( $this, $params, 'Create', $cmd, $dest );
+                       $tempFile->bind( $status->value );
+               } else { // immediate write
+                       $bytes = file_put_contents( $dest, $params['content'] );
+                       if ( $bytes === false ) {
+                               $status->fatal( 'backend-fail-create', $params['dst'] );
+                               return $status;
+                       }
+                       $this->chmod( $dest );
                }
 
-               $this->chmod( $dest );
-
                return $status;
        }
 
+       /**
+        * @see FSFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseCreate( $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
+               }
+       }
+
        /**
         * @see FileBackendStore::doPrepareInternal()
         * @return Status
@@ -569,6 +666,40 @@ class FSFileBackend extends FileBackendStore {
                return false;
        }
 
+       /**
+        * @see FileBackendStore::doExecuteOpHandlesInternal()
+        * @return Array List of corresponding Status objects
+        */
+       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
+               $statuses = array();
+
+               $pipes = array();
+               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
+                       $pipes[$index] = popen( "{$fileOpHandle->cmd} 2>&1", 'r' );
+               }
+
+               $errs = array();
+               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 = '_getResponse' . $fileOpHandle->call;
+                       $this->$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
         *
@@ -583,6 +714,16 @@ class FSFileBackend extends FileBackendStore {
                return $ok;
        }
 
+       /**
+        * Clean up directory separators for the given OS
+        *
+        * @param $path string FS path
+        * @return string
+        */
+       protected function cleanPathSlashes( $path ) {
+               return wfIsWindows() ? strtr( $path, '/', '\\' ) : $path;
+       }
+
        /**
         * Listen for E_WARNING errors and track whether any happen
         *
@@ -610,6 +751,22 @@ class FSFileBackend extends FileBackendStore {
        }
 }
 
+/**
+ * @see FileBackendStoreOpHandle
+ */
+class FSFileOpHandle extends FileBackendStoreOpHandle {
+       public $cmd; // string; shell command
+       public $chmodPath; // string; file to chmod
+
+       public function __construct( $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.
index 6f2d291..94e509e 100644 (file)
@@ -60,6 +60,9 @@ abstract class FileBackend {
        protected $name; // string; unique backend name
        protected $wikiId; // string; unique wiki name
        protected $readOnly; // string; read-only explanation message
+       protected $parallelize; // string; when to do operations in parallel
+       protected $concurrency; // integer; how many operations can be done in parallel
+
        /** @var LockManager */
        protected $lockManager;
        /** @var FileJournal */
@@ -80,6 +83,9 @@ abstract class FileBackend {
         *                     Journals simply log changes to files stored in the backend.
         *     '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.
         *
         * @param $config Array
         */
@@ -100,6 +106,12 @@ abstract class FileBackend {
                $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;
        }
 
        /**
@@ -204,6 +216,7 @@ abstract class FileBackend {
         *                         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.
         *
         * Remarks on locking:
         * File system paths given to operations should refer to files that are
@@ -229,6 +242,16 @@ abstract class FileBackend {
                        unset( $opts['nonLocking'] );
                        unset( $opts['allowStale'] );
                }
+               $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 $this->doOperationsInternal( $ops, $opts );
        }
 
@@ -263,8 +286,7 @@ abstract class FileBackend {
         * @return Status
         */
        final public function create( array $params, array $opts = array() ) {
-               $params['op'] = 'create';
-               return $this->doOperation( $params, $opts );
+               return $this->doOperation( array( 'op' => 'create' ) + $params, $opts );
        }
 
        /**
@@ -278,8 +300,7 @@ abstract class FileBackend {
         * @return Status
         */
        final public function store( array $params, array $opts = array() ) {
-               $params['op'] = 'store';
-               return $this->doOperation( $params, $opts );
+               return $this->doOperation( array( 'op' => 'store' ) + $params, $opts );
        }
 
        /**
@@ -293,8 +314,7 @@ abstract class FileBackend {
         * @return Status
         */
        final public function copy( array $params, array $opts = array() ) {
-               $params['op'] = 'copy';
-               return $this->doOperation( $params, $opts );
+               return $this->doOperation( array( 'op' => 'copy' ) + $params, $opts );
        }
 
        /**
@@ -308,8 +328,7 @@ abstract class FileBackend {
         * @return Status
         */
        final public function move( array $params, array $opts = array() ) {
-               $params['op'] = 'move';
-               return $this->doOperation( $params, $opts );
+               return $this->doOperation( array( 'op' => 'move' ) + $params, $opts );
        }
 
        /**
@@ -323,10 +342,80 @@ abstract class FileBackend {
         * @return Status
         */
        final public function delete( array $params, array $opts = array() ) {
-               $params['op'] = 'delete';
-               return $this->doOperation( $params, $opts );
+               return $this->doOperation( array( 'op' => 'delete' ) + $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:
+        * a) Create a new file in storage with the contents of a string
+        *     array(
+        *         'op'                  => 'create',
+        *         'dst'                 => <storage path>,
+        *         'content'             => <string of new file contents>
+        *     )
+        * b) Copy a file system file into storage
+        *     array(
+        *         'op'                  => 'store',
+        *         'src'                 => <file system path>,
+        *         'dst'                 => <storage path>
+        *     )
+        * c) Copy a file within storage
+        *     array(
+        *         'op'                  => 'copy',
+        *         'src'                 => <storage path>,
+        *         'dst'                 => <storage path>
+        *     )
+        * d) Move a file within storage
+        *     array(
+        *         'op'                  => 'move',
+        *         'src'                 => <storage path>,
+        *         'dst'                 => <storage path>
+        *     )
+        * e) Delete a file within storage
+        *     array(
+        *         'op'                  => 'delete',
+        *         'src'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>
+        *     )
+        * f) Do nothing (no-op)
+        *     array(
+        *         'op'                  => 'null',
+        *     )
+        *
+        * Boolean flags for operations (operation-specific):
+        * 'ignoreMissingSource' : The operation will simply succeed and do
+        *                         nothing if the source file does not exist.
+        *
+        * Return value:
+        * This returns a Status, which contains all warnings and fatals that occured
+        * 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 occured.
+        *
+        * @param $ops Array Set of operations to execute
+        * @return Status
+        */
+       final public function doQuickOperations( array $ops ) {
+               if ( $this->isReadOnly() ) {
+                       return Status::newFatal( 'backend-fail-readonly', $this->name, $this->readOnly );
+               }
+               foreach ( $ops as &$op ) {
+                       $op['overwrite'] = true; // avoids RTTs in key/value stores
+               }
+               return $this->doQuickOperationsInternal( $ops );
+       }
+
+       /**
+        * @see FileBackend::doQuickOperations()
+        */
+       abstract protected function doQuickOperationsInternal( array $ops );
+
        /**
         * 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
@@ -710,6 +799,15 @@ abstract class FileBackend {
                return "mwstore://{$this->name}";
        }
 
+       /**
+        * Get the file journal object for this backend
+        *
+        * @return FileJournal
+        */
+       final public function getJournal() {
+               return $this->fileJournal;
+       }
+
        /**
         * Check if a given path is a "mwstore://" path.
         * This does not do any further validation or any existence checks.
index 69c227d..8bbc96d 100644 (file)
@@ -156,6 +156,21 @@ class FileBackendGroup {
                return $this->backends[$name]['instance'];
        }
 
+       /**
+        * Get the config array for a backend object with a given name
+        *
+        * @param $name string
+        * @return Array
+        * @throws MWException
+        */
+       public function config( $name ) {
+               if ( !isset( $this->backends[$name] ) ) {
+                       throw new MWException( "No backend defined with the name `$name`." );
+               }
+               $class = $this->backends[$name]['class'];
+               return array( 'class' => $class ) + $this->backends[$name]['config'];
+       }
+
        /**
         * Get an appropriate backend object from a storage path
         *
index 769aef6..1fa23eb 100644 (file)
@@ -57,6 +57,9 @@ class FileBackendMultiWrite extends FileBackend {
         *                     FileBackendStore class, but with these additional settings:
         *                         'class'         : The name of the backend class
         *                         'isMultiMaster' : This must be set for one backend.
+        *                         '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 self::CHECK_SIZE and self::CHECK_TIME.
         *                     The checks are done before allowing any file operations.
@@ -68,6 +71,11 @@ class FileBackendMultiWrite extends FileBackend {
                // Construct backends here rather than via registration
                // to keep these backends hidden from outside the proxy.
                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 be this backend.
+                               $config = $config + FileBackendGroup::singleton()->config( $config['template'] );
+                       }
                        $name = $config['name'];
                        if ( isset( $namesUsed[$name] ) ) { // don't break FileOp predicates
                                throw new MWException( "Two or more backends defined with the name $name." );
@@ -143,7 +151,7 @@ class FileBackendMultiWrite extends FileBackend {
                }
 
                // Actually attempt the operation batch...
-               $subStatus = FileOp::attemptBatch( $performOps, $opts, $this->fileJournal );
+               $subStatus = FileOpBatch::attempt( $performOps, $opts, $this->fileJournal );
 
                $success = array();
                $failCount = 0;
@@ -290,6 +298,24 @@ class FileBackendMultiWrite extends FileBackend {
                );
        }
 
+       /**
+        * @see FileBackend::doQuickOperationsInternal()
+        * @return Status
+        */
+       public function doQuickOperationsInternal( array $ops ) {
+               // Do the operations on the master backend; setting Status fields...
+               $realOps = $this->substOpBatchPaths( $ops, $this->backends[$this->masterIndex] );
+               $status = $this->backends[$this->masterIndex]->doQuickOperations( $realOps );
+               // Propagate the operations to the clone backends...
+               foreach ( $this->backends as $index => $backend ) {
+                       if ( $index !== $this->masterIndex ) { // not done already
+                               $realOps = $this->substOpBatchPaths( $ops, $backend );
+                               $status->merge( $backend->doQuickOperations( $realOps ) );
+                       }
+               }
+               return $status;
+       }
+
        /**
         * @see FileBackend::doPrepare()
         * @return Status
index 30a64e2..7d32bec 100644 (file)
@@ -90,6 +90,9 @@ abstract class FileBackendStore extends FileBackend {
         *     content       : the raw file contents
         *     dst           : destination storage path
         *     overwrite     : overwrite any file that exists at the destination
+        *     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 $params Array
         * @return Status
@@ -123,6 +126,9 @@ abstract class FileBackendStore extends FileBackend {
         *     src           : source path on disk
         *     dst           : destination storage path
         *     overwrite     : overwrite any file that exists at the destination
+        *     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 $params Array
         * @return Status
@@ -131,7 +137,8 @@ abstract class FileBackendStore extends FileBackend {
                wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-' . $this->name );
                if ( filesize( $params['src'] ) > $this->maxFileSizeInternal() ) {
-                       $status = Status::newFatal( 'backend-fail-store', $params['dst'] );
+                       $status = Status::newFatal( 'backend-fail-maxsize',
+                               $params['dst'], $this->maxFileSizeInternal() );
                } else {
                        $status = $this->doStoreInternal( $params );
                        $this->clearCache( array( $params['dst'] ) );
@@ -155,6 +162,9 @@ abstract class FileBackendStore extends FileBackend {
         *     src           : source storage path
         *     dst           : destination storage path
         *     overwrite     : overwrite any file that exists at the destination
+        *     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 $params Array
         * @return Status
@@ -182,6 +192,9 @@ abstract class FileBackendStore extends FileBackend {
         * $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 $params Array
         * @return Status
@@ -210,6 +223,9 @@ abstract class FileBackendStore extends FileBackend {
         *     src           : source storage path
         *     dst           : destination storage path
         *     overwrite     : overwrite any file that exists at the destination
+        *     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 $params Array
         * @return Status
@@ -231,6 +247,7 @@ abstract class FileBackendStore extends FileBackend {
         * @return Status
         */
        protected function doMoveInternal( array $params ) {
+               unset( $params['async'] ); // two steps, won't work here :)
                // Copy source to dest
                $status = $this->copyInternal( $params );
                if ( $status->isOK() ) {
@@ -241,6 +258,17 @@ abstract class FileBackendStore extends FileBackend {
                return $status;
        }
 
+       /**
+        * No-op file operation that does nothing.
+        * Do not call this function from places outside FileBackend and FileOp.
+        *
+        * @param $params Array
+        * @return Status
+        */
+       final public function nullInternal( array $params ) {
+               return Status::newGood();
+       }
+
        /**
         * @see FileBackend::concatenate()
         * @return Status
@@ -802,22 +830,6 @@ abstract class FileBackendStore extends FileBackend {
         */
        abstract public function getFileListInternal( $container, $dir, array $params );
 
-       /**
-        * Get the list of supported operations and their corresponding FileOp classes.
-        *
-        * @return Array
-        */
-       protected function supportedOperations() {
-               return array(
-                       'store'       => 'StoreFileOp',
-                       'copy'        => 'CopyFileOp',
-                       'move'        => 'MoveFileOp',
-                       'delete'      => 'DeleteFileOp',
-                       'create'      => 'CreateFileOp',
-                       'null'        => 'NullFileOp'
-               );
-       }
-
        /**
         * Return a list of FileOp objects from a list of operations.
         * Do not call this function from places outside FileBackend.
@@ -830,7 +842,14 @@ abstract class FileBackendStore extends FileBackend {
         * @throws MWException
         */
        final public function getOperationsInternal( array $ops ) {
-               $supportedOps = $this->supportedOperations();
+               $supportedOps = array(
+                       'store'       => 'StoreFileOp',
+                       'copy'        => 'CopyFileOp',
+                       'move'        => 'MoveFileOp',
+                       'delete'      => 'DeleteFileOp',
+                       'create'      => 'CreateFileOp',
+                       'null'        => 'NullFileOp'
+               );
 
                $performOps = array(); // array of FileOp objects
                // Build up ordered array of FileOps...
@@ -907,7 +926,7 @@ abstract class FileBackendStore extends FileBackend {
                $this->primeContainerCache( $performOps );
 
                // Actually attempt the operation batch...
-               $subStatus = FileOp::attemptBatch( $performOps, $opts, $this->fileJournal );
+               $subStatus = FileOpBatch::attempt( $performOps, $opts, $this->fileJournal );
 
                // Merge errors into status fields
                $status->merge( $subStatus );
@@ -918,6 +937,105 @@ abstract class FileBackendStore extends FileBackend {
                return $status;
        }
 
+       /**
+        * @see FileBackend::doQuickOperationsInternal()
+        * @return Status
+        * @throws MWException
+        */
+       final protected function doQuickOperationsInternal( array $ops ) {
+               wfProfileIn( __METHOD__ );
+               wfProfileIn( __METHOD__ . '-' . $this->name );
+               $status = Status::newGood();
+
+               $async = ( $this->parallelize === 'implicit' );
+               $maxConcurrency = $this->concurrency; // throttle
+
+               $statuses = array(); // array of (index => Status)
+               $fileOpHandles = array(); // list of (index => handle) arrays
+               $curFileOpHandles = array(); // current handle batch
+               // Perform the sync-only ops and build up op handles for the async ops...
+               foreach ( $ops as $index => $params ) {
+                       $method = $params['op'] . 'Internal'; // e.g. "storeInternal"
+                       if ( !MWInit::methodExists( __CLASS__, $method ) ) {
+                               wfProfileOut( __METHOD__ . '-' . $this->name );
+                               wfProfileOut( __METHOD__ );
+                               throw new MWException( "Operation '{$params['op']}' is not supported." );
+                       }
+                       $subStatus = $this->$method( array( 'async' => $async ) + $params );
+                       if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { // async
+                               if ( count( $curFileOpHandles ) >= $maxConcurrency ) {
+                                       $fileOpHandles[] = $curFileOpHandles; // push this batch
+                                       $curFileOpHandles = array();
+                               }
+                               $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;
+                       }
+               }
+
+               wfProfileOut( __METHOD__ . '-' . $this->name );
+               wfProfileOut( __METHOD__ );
+               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 $handles Array List of FileBackendStoreOpHandle objects
+        * @return Array Map of Status objects
+        * @throws MWException
+        */
+       final public function executeOpHandlesInternal( array $fileOpHandles ) {
+               wfProfileIn( __METHOD__ );
+               wfProfileIn( __METHOD__ . '-' . $this->name );
+               foreach ( $fileOpHandles as $fileOpHandle ) {
+                       if ( !( $fileOpHandle instanceof FileBackendStoreOpHandle ) ) {
+                               throw new MWException( "Given a non-FileBackendStoreOpHandle object." );
+                       } elseif ( $fileOpHandle->backend->getName() !== $this->getName() ) {
+                               throw new MWException( "Given a FileBackendStoreOpHandle for the wrong backend." );
+                       }
+               }
+               $res = $this->doExecuteOpHandlesInternal( $fileOpHandles );
+               foreach ( $fileOpHandles as $fileOpHandle ) {
+                       $fileOpHandle->closeResources();
+               }
+               wfProfileOut( __METHOD__ . '-' . $this->name );
+               wfProfileOut( __METHOD__ );
+               return $res;
+       }
+
+       /**
+        * @see FileBackendStore::executeOpHandlesInternal()
+        * @return Array List of corresponding Status objects
+        * @throws MWException
+        */
+       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
+               foreach ( $fileOpHandles as $fileOpHandle ) { // OK if empty
+                       throw new MWException( "This backend supports no asynchronous operations." );
+               }
+               return array();
+       }
+
        /**
         * @see FileBackend::clearCache()
         */
@@ -1212,7 +1330,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Get the cache key for a container
         *
-        * @param $container Resolved container name
+        * @param $container string Resolved container name
         * @return string
         */
        private function containerCacheKey( $container ) {
@@ -1222,7 +1340,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Set the cached info for a container
         *
-        * @param $container Resolved container name
+        * @param $container string Resolved container name
         * @param $val mixed Information to cache
         * @return void
         */
@@ -1233,16 +1351,13 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Delete the cached info for a container
         *
-        * @param $container Resolved container name
+        * @param $containers string Resolved container name
         * @return void
         */
        final protected function deleteContainerCache( $container ) {
-               for ( $attempts=1; $attempts <= 3; $attempts++ ) {
-                       if ( $this->memCache->delete( $this->containerCacheKey( $container ) ) ) {
-                               return; // done!
-                       }
+               if ( !$this->memCache->delete( $this->containerCacheKey( $container ) ) ) {
+                       trigger_error( "Unable to delete stat cache for container $container." );
                }
-               trigger_error( "Unable to delete stat cache for container $container." );
        }
 
        /**
@@ -1255,6 +1370,7 @@ abstract class FileBackendStore extends FileBackend {
        final protected function primeContainerCache( array $items ) {
                wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-' . $this->name );
+
                $paths = array(); // list of storage paths
                $contNames = array(); // (cache key => resolved container name)
                // Get all the paths/containers from the items...
@@ -1278,13 +1394,14 @@ abstract class FileBackendStore extends FileBackend {
 
                $contInfo = array(); // (resolved container name => cache value)
                // Get all cache entries for these container cache keys...
-               $values = $this->memCache->getBatch( array_keys( $contNames ) );
+               $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' ) );
+
                wfProfileOut( __METHOD__ . '-' . $this->name );
                wfProfileOut( __METHOD__ );
        }
@@ -1302,7 +1419,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Get the cache key for a file path
         *
-        * @param $path Storage path
+        * @param $path string Storage path
         * @return string
         */
        private function fileCacheKey( $path ) {
@@ -1312,7 +1429,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Set the cached stat info for a file path
         *
-        * @param $path Storage path
+        * @param $path string Storage path
         * @param $val mixed Information to cache
         * @return void
         */
@@ -1323,16 +1440,13 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * Delete the cached stat info for a file path
         *
-        * @param $path Storage path
+        * @param $path string Storage path
         * @return void
         */
        final protected function deleteFileCache( $path ) {
-               for ( $attempts=1; $attempts <= 3; $attempts++ ) {
-                       if ( $this->memCache->delete( $this->fileCacheKey( $path ) ) ) {
-                               return; // done!
-                       }
+               if ( !$this->memCache->delete( $this->fileCacheKey( $path ) ) ) {
+                       trigger_error( "Unable to delete stat cache for file $path." );
                }
-               trigger_error( "Unable to delete stat cache for file $path." );
        }
 
        /**
@@ -1345,6 +1459,7 @@ abstract class FileBackendStore extends FileBackend {
        final protected function primeFileCache( array $items ) {
                wfProfileIn( __METHOD__ );
                wfProfileIn( __METHOD__ . '-' . $this->name );
+
                $paths = array(); // list of storage paths
                $pathNames = array(); // (cache key => storage path)
                // Get all the paths/containers from the items...
@@ -1364,18 +1479,47 @@ abstract class FileBackendStore extends FileBackend {
                        }
                }
                // Get all cache entries for these container cache keys...
-               $values = $this->memCache->getBatch( array_keys( $pathNames ) );
+               $values = $this->memCache->getMulti( array_keys( $pathNames ) );
                foreach ( $values as $cacheKey => $val ) {
                        if ( is_array( $val ) ) {
                                $this->trimCache(); // limit memory
                                $this->cache[$pathNames[$cacheKey]]['stat'] = $val;
                        }
                }
+
                wfProfileOut( __METHOD__ . '-' . $this->name );
                wfProfileOut( __METHOD__ );
        }
 }
 
+/**
+ * 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 = array(); // params to caller functions
+       /** @var FileBackendStore */
+       public $backend;
+       /** @var Array */
+       public $resourcesToClose = array();
+
+       public $call; // string; name that identifies the function called
+
+       /**
+        * Close all open file handles
+        *
+        * @return void
+        */
+       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.
index 8a2d428..b2b46ed 100644 (file)
  */
 
 /**
- * Helper class for representing operations with transaction support.
+ * FileBackend helper class for representing operations.
  * Do not use this class from places outside FileBackend.
  *
- * Methods called from attemptBatch() should avoid throwing exceptions at all costs.
- * FileOp objects should be lightweight in order to support large arrays in memory.
+ * 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
@@ -40,6 +41,7 @@ abstract class FileOp {
 
        protected $state = self::STATE_NEW; // integer
        protected $failed = false; // boolean
+       protected $async = false; // boolean
        protected $useLatest = true; // boolean
        protected $batchId; // string
 
@@ -51,10 +53,6 @@ abstract class FileOp {
        const STATE_CHECKED = 2;
        const STATE_ATTEMPTED = 3;
 
-       /* Timeout related parameters */
-       const MAX_BATCH_SIZE = 1000;
-       const TIME_LIMIT_SEC = 300; // 5 minutes
-
        /**
         * Build a new file operation transaction
         *
@@ -86,7 +84,7 @@ abstract class FileOp {
         * @param $batchId string
         * @return void
         */
-       final protected function setBatchId( $batchId ) {
+       final public function setBatchId( $batchId ) {
                $this->batchId = $batchId;
        }
 
@@ -96,130 +94,99 @@ abstract class FileOp {
         * @param $allowStale bool
         * @return void
         */
-       final protected function allowStaleReads( $allowStale ) {
+       final public function allowStaleReads( $allowStale ) {
                $this->useLatest = !$allowStale;
        }
 
        /**
-        * Attempt to perform a series of file operations.
-        * Callers are responsible for handling file locking.
+        * Get the value of the parameter with the given name
         *
-        * $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.
-        * 'allowStale'   : Don't require the latest available data.
-        *                  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.
+        * @param $name string
+        * @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()
         *
-        * The resulting Status will be "OK" unless:
-        *     a) unexpected operation errors occurred (network partitions, disk full...)
-        *     b) significant operation errors occured and 'force' was not set
+        * @return bool
+        */
+       final public function failed() {
+               return $this->failed;
+       }
+
+       /**
+        * Get a new empty predicates array for precheck()
         *
-        * @param $performOps Array List of FileOp operations
-        * @param $opts Array Batch operation options
-        * @param $journal FileJournal Journal to log operations to
-        * @return Status
+        * @return Array
         */
-       final public static function attemptBatch(
-               array $performOps, array $opts, FileJournal $journal
-       ) {
-               $status = Status::newGood();
+       final public static function newPredicates() {
+               return array( 'exists' => array(), 'sha1' => array() );
+       }
 
-               $n = count( $performOps );
-               if ( $n > self::MAX_BATCH_SIZE ) {
-                       $status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE );
-                       return $status;
-               }
+       /**
+        * Get a new empty dependency tracking array for paths read/written to
+        *
+        * @return Array
+        */
+       final public static function newDependencies() {
+               return array( 'read' => array(), 'write' => array() );
+       }
 
-               $batchId = $journal->getTimestampedUUID();
-               $allowStale = !empty( $opts['allowStale'] );
-               $ignoreErrors = !empty( $opts['force'] );
-               $journaled = empty( $opts['nonJournaled'] );
-
-               $entries = array(); // file journal entries
-               $predicates = FileOp::newPredicates(); // account for previous op in prechecks
-               // Do pre-checks for each operation; abort on failure...
-               foreach ( $performOps as $index => $fileOp ) {
-                       $fileOp->setBatchId( $batchId );
-                       $fileOp->allowStaleReads( $allowStale );
-                       $oldPredicates = $predicates;
-                       $subStatus = $fileOp->precheck( $predicates ); // updates $predicates
-                       $status->merge( $subStatus );
-                       if ( $subStatus->isOK() ) {
-                               if ( $journaled ) { // journal log entry
-                                       $entries = array_merge( $entries,
-                                               self::getJournalEntries( $fileOp, $oldPredicates, $predicates ) );
-                               }
-                       } else { // operation failed?
-                               $status->success[$index] = false;
-                               ++$status->failCount;
-                               if ( !$ignoreErrors ) {
-                                       return $status; // abort
-                               }
-                       }
-               }
+       /**
+        * Update a dependency tracking array to account for this operation
+        *
+        * @param $deps Array 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;
+       }
 
-               // Log the operations in file journal...
-               if ( count( $entries ) ) {
-                       $subStatus = $journal->logChangeBatch( $entries, $batchId );
-                       if ( !$subStatus->isOK() ) {
-                               return $subStatus; // abort
+       /**
+        * Check if this operation changes files listed in $paths
+        *
+        * @param $paths Array Prior path reads/writes; format of FileOp::newPredicates()
+        * @return boolean
+        */
+       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
                        }
                }
-
-               if ( $ignoreErrors ) { // treat precheck() fatals as mere warnings
-                       $status->setResult( true, $status->value );
-               }
-
-               // Attempt each operation...
-               foreach ( $performOps as $index => $fileOp ) {
-                       if ( $fileOp->failed() ) {
-                               continue; // nothing to do
-                       }
-                       $subStatus = $fileOp->attempt();
-                       $status->merge( $subStatus );
-                       if ( $subStatus->isOK() ) {
-                               $status->success[$index] = true;
-                               ++$status->successCount;
-                       } else {
-                               $status->success[$index] = false;
-                               ++$status->failCount;
-                               // We can't continue (even with $ignoreErrors) as $predicates is wrong.
-                               // Log the remaining ops as failed for recovery...
-                               for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
-                                       $performOps[$i]->logFailure( 'attempt_aborted' );
-                               }
-                               return $status; // bail out
+               foreach ( $this->storagePathsRead() as $path ) {
+                       if ( isset( $deps['write'][$path] ) ) {
+                               return true; // "flow" dependency
                        }
                }
-
-               return $status;
+               return false;
        }
 
        /**
-        * Get the file journal entries for a single file operation
+        * Get the file journal entries for this file operation
         *
-        * @param $fileOp FileOp
-        * @param $oPredicates Array Pre-op information about files
-        * @param $nPredicates Array Post-op information about files
+        * @param $oPredicates Array Pre-op info about files (format of FileOp::newPredicates)
+        * @param $nPredicates Array Post-op info about files (format of FileOp::newPredicates)
         * @return Array
         */
-       final protected static function getJournalEntries(
-               FileOp $fileOp, array $oPredicates, array $nPredicates
-       ) {
+       final public function getJournalEntries( array $oPredicates, array $nPredicates ) {
                $nullEntries = array();
                $updateEntries = array();
                $deleteEntries = array();
-               $pathsUsed = array_merge( $fileOp->storagePathsRead(), $fileOp->storagePathsChanged() );
+               $pathsUsed = array_merge( $this->storagePathsRead(), $this->storagePathsChanged() );
                foreach ( $pathsUsed as $path ) {
                        $nullEntries[] = array( // assertion for recovery
                                'op'      => 'null',
                                'path'    => $path,
-                               'newSha1' => $fileOp->fileSha1( $path, $oPredicates )
+                               'newSha1' => $this->fileSha1( $path, $oPredicates )
                        );
                }
-               foreach ( $fileOp->storagePathsChanged() as $path ) {
+               foreach ( $this->storagePathsChanged() as $path ) {
                        if ( $nPredicates['sha1'][$path] === false ) { // deleted
                                $deleteEntries[] = array(
                                        'op'      => 'delete',
@@ -228,7 +195,7 @@ abstract class FileOp {
                                );
                        } else { // created/updated
                                $updateEntries[] = array(
-                                       'op'      => $fileOp->fileExists( $path, $oPredicates ) ? 'update' : 'create',
+                                       'op'      => $this->fileExists( $path, $oPredicates ) ? 'update' : 'create',
                                        'path'    => $path,
                                        'newSha1' => $nPredicates['sha1'][$path]
                                );
@@ -237,34 +204,6 @@ abstract class FileOp {
                return array_merge( $nullEntries, $updateEntries, $deleteEntries );
        }
 
-       /**
-        * Get the value of the parameter with the given name
-        *
-        * @param $name string
-        * @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 array( 'exists' => array(), 'sha1' => array() );
-       }
-
        /**
         * Check preconditions of the operation without writing anything
         *
@@ -284,7 +223,14 @@ abstract class FileOp {
        }
 
        /**
-        * Attempt the operation, backing up files as needed; this must be reversible
+        * @return Status
+        */
+       protected function doPrecheck( array &$predicates ) {
+               return Status::newGood();
+       }
+
+       /**
+        * Attempt the operation
         *
         * @return Status
         */
@@ -303,6 +249,25 @@ abstract class FileOp {
                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
         *
@@ -312,36 +277,48 @@ abstract class FileOp {
                return array( array(), array() );
        }
 
+       /**
+        * Adjust params to FileBackendStore internal file calls
+        *
+        * @param $params Array
+        * @return Array (required params list, optional params list)
+        */
+       protected function setFlags( array $params ) {
+               return array( 'async' => $this->async ) + $params;
+       }
+
        /**
         * Get a list of storage paths read from for this operation
         *
         * @return Array
         */
-       public function storagePathsRead() {
-               return array();
+       final public function storagePathsRead() {
+               return array_map( 'FileBackend::normalizeStoragePath', $this->doStoragePathsRead() );
        }
 
        /**
-        * Get a list of storage paths written to for this operation
-        *
+        * @see FileOp::storagePathsRead()
         * @return Array
         */
-       public function storagePathsChanged() {
+       protected function doStoragePathsRead() {
                return array();
        }
 
        /**
-        * @return Status
+        * Get a list of storage paths written to for this operation
+        *
+        * @return Array
         */
-       protected function doPrecheck( array &$predicates ) {
-               return Status::newGood();
+       final public function storagePathsChanged() {
+               return array_map( 'FileBackend::normalizeStoragePath', $this->doStoragePathsChanged() );
        }
 
        /**
-        * @return Status
+        * @see FileOp::storagePathsChanged()
+        * @return Array
         */
-       protected function doAttempt() {
-               return Status::newGood();
+       protected function doStoragePathsChanged() {
+               return array();
        }
 
        /**
@@ -425,13 +402,22 @@ abstract class FileOp {
                }
        }
 
+       /**
+        * 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 $action string
         * @return void
         */
-       final protected function logFailure( $action ) {
+       final public function logFailure( $action ) {
                $params = $this->params;
                $params['failedAction'] = $action;
                try {
@@ -464,10 +450,13 @@ class StoreFileOp extends FileOp {
                        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 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;
                }
@@ -482,12 +471,11 @@ class StoreFileOp extends FileOp {
        }
 
        protected function doAttempt() {
-               $status = Status::newGood();
                // Store the file at the destination
                if ( !$this->destSameAsSource ) {
-                       $status->merge( $this->backend->storeInternal( $this->params ) );
+                       return $this->backend->storeInternal( $this->setFlags( $this->params ) );
                }
-               return $status;
+               return Status::newGood();
        }
 
        protected function getSourceSha1Base36() {
@@ -500,7 +488,7 @@ class StoreFileOp extends FileOp {
                return $hash;
        }
 
-       public function storagePathsChanged() {
+       protected function doStoragePathsChanged() {
                return array( $this->params['dst'] );
        }
 }
@@ -522,10 +510,13 @@ class CreateFileOp extends FileOp {
                $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 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;
                }
@@ -540,19 +531,18 @@ class CreateFileOp extends FileOp {
        }
 
        protected function doAttempt() {
-               $status = Status::newGood();
-               // Create the file at the destination
                if ( !$this->destSameAsSource ) {
-                       $status->merge( $this->backend->createInternal( $this->params ) );
+                       // Create the file at the destination
+                       return $this->backend->createInternal( $this->setFlags( $this->params ) );
                }
-               return $status;
+               return Status::newGood();
        }
 
        protected function getSourceSha1Base36() {
                return wfBaseConvert( sha1( $this->params['content'] ), 16, 36, 31 );
        }
 
-       public function storagePathsChanged() {
+       protected function doStoragePathsChanged() {
                return array( $this->params['dst'] );
        }
 }
@@ -578,6 +568,7 @@ class CopyFileOp extends FileOp {
                        return $status;
                // Check if a file can be placed 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;
                }
@@ -592,22 +583,21 @@ class CopyFileOp extends FileOp {
        }
 
        protected function doAttempt() {
-               $status = Status::newGood();
                // Do nothing if the src/dst paths are the same
                if ( $this->params['src'] !== $this->params['dst'] ) {
                        // Copy the file into the destination
                        if ( !$this->destSameAsSource ) {
-                               $status->merge( $this->backend->copyInternal( $this->params ) );
+                               return $this->backend->copyInternal( $this->setFlags( $this->params ) );
                        }
                }
-               return $status;
+               return Status::newGood();
        }
 
-       public function storagePathsRead() {
+       protected function doStoragePathsRead() {
                return array( $this->params['src'] );
        }
 
-       public function storagePathsChanged() {
+       protected function doStoragePathsChanged() {
                return array( $this->params['dst'] );
        }
 }
@@ -633,6 +623,7 @@ class MoveFileOp extends FileOp {
                        return $status;
                // Check if a file can be placed 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;
                }
@@ -649,26 +640,25 @@ class MoveFileOp extends FileOp {
        }
 
        protected function doAttempt() {
-               $status = Status::newGood();
                // Do nothing if the src/dst paths are the same
                if ( $this->params['src'] !== $this->params['dst'] ) {
                        if ( !$this->destSameAsSource ) {
                                // Move the file into the destination
-                               $status->merge( $this->backend->moveInternal( $this->params ) );
+                               return $this->backend->moveInternal( $this->setFlags( $this->params ) );
                        } else {
                                // Just delete source as the destination needs no changes
                                $params = array( 'src' => $this->params['src'] );
-                               $status->merge( $this->backend->deleteInternal( $params ) );
+                               return $this->backend->deleteInternal( $this->setFlags( $params ) );
                        }
                }
-               return $status;
+               return Status::newGood();
        }
 
-       public function storagePathsRead() {
+       protected function doStoragePathsRead() {
                return array( $this->params['src'] );
        }
 
-       public function storagePathsChanged() {
+       protected function doStoragePathsChanged() {
                return array( $this->params['src'], $this->params['dst'] );
        }
 }
@@ -703,15 +693,14 @@ class DeleteFileOp extends FileOp {
        }
 
        protected function doAttempt() {
-               $status = Status::newGood();
                if ( $this->needsDelete ) {
                        // Delete the source file
-                       $status->merge( $this->backend->deleteInternal( $this->params ) );
+                       return $this->backend->deleteInternal( $this->setFlags( $this->params ) );
                }
-               return $status;
+               return Status::newGood();
        }
 
-       public function storagePathsChanged() {
+       protected function doStoragePathsChanged() {
                return array( $this->params['src'] );
        }
 }
diff --git a/includes/filerepo/backend/FileOpBatch.php b/includes/filerepo/backend/FileOpBatch.php
new file mode 100644 (file)
index 0000000..9ffe0f2
--- /dev/null
@@ -0,0 +1,223 @@
+<?php
+/**
+ * @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.
+        * 'allowStale'   : Don't require the latest available data.
+        *                  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.
+        * '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 occured and 'force' was not set
+        *
+        * @param $performOps Array List of FileOp operations
+        * @param $opts Array Batch operation options
+        * @param $journal FileJournal Journal to log operations to
+        * @return Status
+        */
+       public static function attempt( array $performOps, array $opts, FileJournal $journal ) {
+               wfProfileIn( __METHOD__ );
+               $status = Status::newGood();
+
+               $n = count( $performOps );
+               if ( $n > self::MAX_BATCH_SIZE ) {
+                       $status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE );
+                       wfProfileOut( __METHOD__ );
+                       return $status;
+               }
+
+               $batchId = $journal->getTimestampedUUID();
+               $allowStale = !empty( $opts['allowStale'] );
+               $ignoreErrors = !empty( $opts['force'] );
+               $journaled = empty( $opts['nonJournaled'] );
+               $maxConcurrency = isset( $opts['concurrency'] ) ? $opts['concurrency'] : 1;
+
+               $entries = array(); // file journal entry list
+               $predicates = FileOp::newPredicates(); // account for previous ops in prechecks
+               $curBatch = array(); // concurrent FileOp sub-batch accumulation
+               $curBatchDeps = FileOp::newDependencies(); // paths used in FileOp sub-batch
+               $pPerformOps = array(); // 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
+                       $fileOp->allowStaleReads( $allowStale ); // consistency level
+                       // 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 = array(); // 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 ) {
+                                       wfProfileOut( __METHOD__ );
+                                       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() ) {
+                               wfProfileOut( __METHOD__ );
+                               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)...
+               if ( count( $pPerformOps ) < count( $performOps ) ) {
+                       self::runBatchParallel( $pPerformOps, $status );
+               } else {
+                       self::runBatchSeries( $performOps, $status );
+               }
+
+               wfProfileOut( __METHOD__ );
+               return $status;
+       }
+
+       /**
+        * Attempt a list of file operations in series.
+        * This will abort remaining ops on failure.
+        *
+        * @param $performOps Array
+        * @param $status Status
+        * @return bool Success
+        */
+       protected static function runBatchSeries( array $performOps, Status $status ) {
+               foreach ( $performOps as $index => $fileOp ) {
+                       if ( $fileOp->failed() ) {
+                               continue; // nothing to do
+                       }
+                       $subStatus = $fileOp->attempt();
+                       $status->merge( $subStatus );
+                       if ( $subStatus->isOK() ) {
+                               $status->success[$index] = true;
+                               ++$status->successCount;
+                       } else {
+                               $status->success[$index] = false;
+                               ++$status->failCount;
+                               // We can't continue (even with $ignoreErrors) as $predicates is wrong.
+                               // Log the remaining ops as failed for recovery...
+                               for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
+                                       $performOps[$i]->logFailure( 'attempt_aborted' );
+                               }
+                               return false; // bail out
+                       }
+               }
+               return true;
+       }
+
+       /**
+        * 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 $performOps Array
+        * @param $status Status
+        * @return bool Success
+        */
+       protected static function runBatchParallel( array $pPerformOps, Status $status ) {
+               $aborted = false;
+               foreach ( $pPerformOps as $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 ) {
+                                       $performOpsBatch[$i]->logFailure( 'attempt_aborted' );
+                               }
+                               continue;
+                       }
+                       $statuses = array();
+                       $opHandles = array();
+                       // Get the backend; all sub-batch ops belong to a single backend
+                       $backend = reset( $performOpsBatch )->getBackend();
+                       // If attemptAsync() returns synchronously, it was either an
+                       // error Status or the backend just doesn't support async ops.
+                       foreach ( $performOpsBatch as $i => $fileOp ) {
+                               if ( !$fileOp->failed() ) { // failed => already has Status
+                                       $subStatus = $fileOp->attemptAsync();
+                                       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...
+                       foreach ( $performOpsBatch as $i => $fileOp ) {
+                               if ( !$fileOp->failed() ) { // failed => already has Status
+                                       $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
+                                       }
+                               }
+                       }
+               }
+               return $status;
+       }
+}
index f40c323..12fc801 100644 (file)
@@ -41,12 +41,14 @@ class SwiftFileBackend extends FileBackendStore {
        protected $auth; // Swift authentication handler
        protected $authTTL; // integer seconds
        protected $swiftAnonUser; // string; username to handle unauthenticated requests
+       protected $swiftUseCDN; // boolean; whether CloudFiles CDN is enabled
        protected $maxContCacheSize = 300; // integer; max containers with entries
 
        /** @var CF_Connection */
        protected $conn; // Swift connection handle
        protected $connStarted = 0; // integer UNIX timestamp
        protected $connContainers = array(); // container object cache
+       protected $connException; // CloudFiles exception
 
        /**
         * @see FileBackendStore::__construct()
@@ -56,6 +58,7 @@ class SwiftFileBackend extends FileBackendStore {
         *    swiftKey           : Swift authentication key for the above user
         *    swiftAuthTTL       : Swift authentication TTL (seconds)
         *    swiftAnonUser      : Swift user used for end-user requests (account:username)
+        *    swiftUseCDN        : Whether a Cloud Files Content Delivery Network is set up
         *    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)
@@ -64,6 +67,9 @@ class SwiftFileBackend extends FileBackendStore {
         */
        public function __construct( array $config ) {
                parent::__construct( $config );
+               if ( !MWInit::classExists( 'CF_Constants' ) ) {
+                       throw new MWException( 'SwiftCloudFiles extension not installed.' );
+               }
                // Required settings
                $this->auth = new CF_Authentication(
                        $config['swiftUser'],
@@ -81,6 +87,9 @@ class SwiftFileBackend extends FileBackendStore {
                $this->shardViaHashLevels = isset( $config['shardViaHashLevels'] )
                        ? $config['shardViaHashLevels']
                        : '';
+               $this->swiftUseCDN = isset( $config['swiftUseCDN'] )
+                       ? $config['swiftUseCDN']
+                       : false;
                // Cache container info to mask latency
                $this->memCache = wfGetMainCache();
        }
@@ -110,9 +119,8 @@ class SwiftFileBackend extends FileBackendStore {
                        $this->getContainer( $container );
                        return true; // container exists
                } catch ( NoSuchContainerException $e ) {
-               } catch ( InvalidResponseException $e ) {
-               } catch ( Exception $e ) { // some other exception?
-                       $this->logException( $e, __METHOD__, array( 'path' => $storagePath ) );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, null, __METHOD__, array( 'path' => $storagePath ) );
                }
 
                return false;
@@ -143,12 +151,8 @@ class SwiftFileBackend extends FileBackendStore {
                } catch ( NoSuchContainerException $e ) {
                        $status->fatal( 'backend-fail-create', $params['dst'] );
                        return $status;
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
@@ -167,20 +171,36 @@ class SwiftFileBackend extends FileBackendStore {
                        $obj->set_etag( md5( $params['content'] ) );
                        // Use the same content type as StreamFile for security
                        $obj->content_type = StreamFile::contentTypeFromPath( $params['dst'] );
-                       // Actually write the object in Swift
-                       $obj->write( $params['content'] );
+                       if ( !empty( $params['async'] ) ) { // deferred
+                               $handle = $obj->write_async( $params['content'] );
+                               $status->value = new SwiftFileOpHandle( $this, $params, 'Create', $handle );
+                               $status->value->affectedObjects[] = $obj;
+                       } else { // actually write the object in Swift
+                               $obj->write( $params['content'] );
+                               $this->purgeCDNCache( array( $obj ) );
+                       }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
                } catch ( BadContentTypeException $e ) {
                        $status->fatal( 'backend-fail-contenttype', $params['dst'] );
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                }
 
                return $status;
        }
 
+       /**
+        * @see SwiftFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseCreate( CF_Async_Op $cfOp, Status $status, array $params ) {
+               try {
+                       $cfOp->getLastResponse();
+               } catch ( BadContentTypeException $e ) {
+                       $status->fatal( 'backend-fail-contenttype', $params['dst'] );
+               }
+       }
+
        /**
         * @see FileBackendStore::doStoreInternal()
         * @return Status
@@ -206,12 +226,8 @@ class SwiftFileBackend extends FileBackendStore {
                } catch ( NoSuchContainerException $e ) {
                        $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
                        return $status;
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
@@ -234,22 +250,48 @@ class SwiftFileBackend extends FileBackendStore {
                        $obj->set_etag( md5_file( $params['src'] ) );
                        // Use the same content type as StreamFile for security
                        $obj->content_type = StreamFile::contentTypeFromPath( $params['dst'] );
-                       // Actually write the object in Swift
-                       $obj->load_from_filename( $params['src'], True ); // calls $obj->write()
+                       if ( !empty( $params['async'] ) ) { // deferred
+                               wfSuppressWarnings();
+                               $fp = fopen( $params['src'], 'rb' );
+                               wfRestoreWarnings();
+                               if ( !$fp ) {
+                                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+                               } else {
+                                       $handle = $obj->write_async( $fp, filesize( $params['src'] ), true );
+                                       $status->value = new SwiftFileOpHandle( $this, $params, 'Store', $handle );
+                                       $status->value->resourcesToClose[] = $fp;
+                                       $status->value->affectedObjects[] = $obj;
+                               }
+                       } else { // actually write the object in Swift
+                               $obj->load_from_filename( $params['src'], true ); // calls $obj->write()
+                               $this->purgeCDNCache( array( $obj ) );
+                       }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
                } catch ( BadContentTypeException $e ) {
                        $status->fatal( 'backend-fail-contenttype', $params['dst'] );
                } catch ( IOException $e ) {
                        $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                }
 
                return $status;
        }
 
+       /**
+        * @see SwiftFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseStore( CF_Async_Op $cfOp, Status $status, array $params ) {
+               try {
+                       $cfOp->getLastResponse();
+               } catch ( BadContentTypeException $e ) {
+                       $status->fatal( 'backend-fail-contenttype', $params['dst'] );
+               } catch ( IOException $e ) {
+                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+               }
+       }
+
        /**
         * @see FileBackendStore::doCopyInternal()
         * @return Status
@@ -282,30 +324,116 @@ class SwiftFileBackend extends FileBackendStore {
                } catch ( NoSuchContainerException $e ) {
                        $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
                        return $status;
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
                // (b) Actually copy the file to the destination
                try {
-                       $sContObj->copy_object_to( $srcRel, $dContObj, $dstRel );
+                       $dstObj = new CF_Object( $dContObj, $dstRel, false, false ); // skip HEAD
+                       if ( !empty( $params['async'] ) ) { // deferred
+                               $handle = $sContObj->copy_object_to_async( $srcRel, $dContObj, $dstRel );
+                               $status->value = new SwiftFileOpHandle( $this, $params, 'Copy', $handle );
+                               $status->value->affectedObjects[] = $dstObj;
+                       } else { // actually write the object in Swift
+                               $sContObj->copy_object_to( $srcRel, $dContObj, $dstRel );
+                               $this->purgeCDNCache( array( $dstObj ) );
+                       }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
+               } catch ( NoSuchObjectException $e ) { // source object does not exist
+                       $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
+               }
+
+               return $status;
+       }
+
+       /**
+        * @see SwiftFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseCopy( CF_Async_Op $cfOp, Status $status, array $params ) {
+               try {
+                       $cfOp->getLastResponse();
                } catch ( NoSuchObjectException $e ) { // source object does not exist
                        $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] );
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               }
+       }
+
+       /**
+        * @see FileBackendStore::doMoveInternal()
+        * @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;
+               }
+
+               // (a) Check the source/destination containers and destination object
+               try {
+                       $sContObj = $this->getContainer( $srcCont );
+                       $dContObj = $this->getContainer( $dstCont );
+                       if ( empty( $params['overwrite'] ) &&
+                               $this->fileExists( array( 'src' => $params['dst'], 'latest' => 1 ) ) )
+                       {
+                               $status->fatal( 'backend-fail-alreadyexists', $params['dst'] );
+                               return $status;
+                       }
+               } catch ( NoSuchContainerException $e ) {
+                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+                       return $status;
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
+                       return $status;
+               }
+
+               // (b) Actually move the file to the destination
+               try {
+                       $srcObj = new CF_Object( $sContObj, $srcRel, false, false ); // skip HEAD
+                       $dstObj = new CF_Object( $dContObj, $dstRel, false, false ); // skip HEAD
+                       if ( !empty( $params['async'] ) ) { // deferred
+                               $handle = $sContObj->move_object_to_async( $srcRel, $dContObj, $dstRel );
+                               $status->value = new SwiftFileOpHandle( $this, $params, 'Move', $handle );
+                               $status->value->affectedObjects[] = $srcObj;
+                               $status->value->affectedObjects[] = $dstObj;
+                       } else { // actually write the object in Swift
+                               $sContObj->move_object_to( $srcRel, $dContObj, $dstRel );
+                               $this->purgeCDNCache( array( $srcObj, $dstObj ) );
+                       }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
+               } catch ( NoSuchObjectException $e ) { // source object does not exist
+                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                }
 
                return $status;
        }
 
+       /**
+        * @see SwiftFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseMove( CF_Async_Op $cfOp, Status $status, array $params ) {
+               try {
+                       $cfOp->getLastResponse();
+               } catch ( NoSuchObjectException $e ) { // source object does not exist
+                       $status->fatal( 'backend-fail-move', $params['src'], $params['dst'] );
+               }
+       }
+
        /**
         * @see FileBackendStore::doDeleteInternal()
         * @return Status
@@ -321,23 +449,45 @@ class SwiftFileBackend extends FileBackendStore {
 
                try {
                        $sContObj = $this->getContainer( $srcCont );
-                       $sContObj->delete_object( $srcRel );
+                       $srcObj = new CF_Object( $sContObj, $srcRel, false, false ); // skip HEAD
+                       if ( !empty( $params['async'] ) ) { // deferred
+                               $handle = $sContObj->delete_object_async( $srcRel );
+                               $status->value = new SwiftFileOpHandle( $this, $params, 'Delete', $handle );
+                               $status->value->affectedObjects[] = $srcObj;
+                       } else { // actually write the object in Swift
+                               $sContObj->delete_object( $srcRel );
+                               $this->purgeCDNCache( array( $srcObj ) );
+                       }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
                } catch ( NoSuchContainerException $e ) {
                        $status->fatal( 'backend-fail-delete', $params['src'] );
                } catch ( NoSuchObjectException $e ) {
                        if ( empty( $params['ignoreMissingSource'] ) ) {
                                $status->fatal( 'backend-fail-delete', $params['src'] );
                        }
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                }
 
                return $status;
        }
 
+       /**
+        * @see SwiftFileBackend::doExecuteOpHandlesInternal()
+        */
+       protected function _getResponseDelete( CF_Async_Op $cfOp, Status $status, array $params ) {
+               try {
+                       $cfOp->getLastResponse();
+               } catch ( NoSuchContainerException $e ) {
+                       $status->fatal( 'backend-fail-delete', $params['src'] );
+               } catch ( NoSuchObjectException $e ) {
+                       if ( empty( $params['ignoreMissingSource'] ) ) {
+                               $status->fatal( 'backend-fail-delete', $params['src'] );
+                       }
+               }
+       }
+
        /**
         * @see FileBackendStore::doPrepareInternal()
         * @return Status
@@ -352,32 +502,29 @@ class SwiftFileBackend extends FileBackendStore {
                        return $status; // already exists
                } catch ( NoSuchContainerException $e ) {
                        // NoSuchContainerException thrown: container does not exist
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
                // (b) Create container as needed
                try {
                        $contObj = $this->createContainer( $fullCont );
+                       // Make container public to end-users...
                        if ( $this->swiftAnonUser != '' ) {
-                               // Make container public to end-users...
                                $status->merge( $this->setContainerAccess(
                                        $contObj,
                                        array( $this->auth->username, $this->swiftAnonUser ), // read
                                        array( $this->auth->username ) // write
                                ) );
                        }
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+                       if ( $this->swiftUseCDN ) { // Rackspace style CDN
+                               $contObj->make_public();
+                       }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
@@ -391,29 +538,31 @@ class SwiftFileBackend extends FileBackendStore {
        protected function doSecureInternal( $fullCont, $dir, array $params ) {
                $status = Status::newGood();
 
-               if ( $this->swiftAnonUser != '' ) {
-                       // Restrict container from end-users...
-                       try {
-                               // doPrepareInternal() should have been called,
-                               // so the Swift container should already exist...
-                               $contObj = $this->getContainer( $fullCont ); // normally a cache hit
-                               // NoSuchContainerException not thrown: container must exist
-                               if ( !isset( $contObj->mw_wasSecured ) ) {
-                                       $status->merge( $this->setContainerAccess(
-                                               $contObj,
-                                               array( $this->auth->username ), // read
-                                               array( $this->auth->username ) // write
-                                       ) );
-                                       // @TODO: when php-cloudfiles supports container
-                                       // metadata, we can make use of that to avoid RTTs
-                                       $contObj->mw_wasSecured = true; // avoid useless RTTs
-                               }
-                       } catch ( InvalidResponseException $e ) {
-                               $status->fatal( 'backend-fail-connect', $this->name );
-                       } catch ( Exception $e ) { // some other exception?
-                               $status->fatal( 'backend-fail-internal', $this->name );
-                               $this->logException( $e, __METHOD__, $params );
+               // Restrict container from end-users...
+               try {
+                       // doPrepareInternal() should have been called,
+                       // so the Swift container should already exist...
+                       $contObj = $this->getContainer( $fullCont ); // normally a cache hit
+                       // NoSuchContainerException not thrown: container must exist
+
+                       // Make container private to end-users...
+                       if ( $this->swiftAnonUser != '' && !isset( $contObj->mw_wasSecured ) ) {
+                               $status->merge( $this->setContainerAccess(
+                                       $contObj,
+                                       array( $this->auth->username ), // read
+                                       array( $this->auth->username ) // write
+                               ) );
+                               // @TODO: when php-cloudfiles supports container
+                               // metadata, we can make use of that to avoid RTTs
+                               $contObj->mw_wasSecured = true; // avoid useless RTTs
+                       }
+                       if ( $this->swiftUseCDN && $contObj->is_public() ) { // Rackspace style CDN
+                               $contObj->make_private();
                        }
+               } catch ( CDNNotEnabledException $e ) {
+                       // CDN not enabled; nothing to see here
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                }
 
                return $status;
@@ -436,12 +585,8 @@ class SwiftFileBackend extends FileBackendStore {
                        $contObj = $this->getContainer( $fullCont, true );
                } catch ( NoSuchContainerException $e ) {
                        return $status; // ok, nothing to do
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-internal', $this->name );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
@@ -451,12 +596,10 @@ class SwiftFileBackend extends FileBackendStore {
                                $this->deleteContainer( $fullCont );
                        } catch ( NoSuchContainerException $e ) {
                                return $status; // race?
-                       } catch ( InvalidResponseException $e ) {
-                               $status->fatal( 'backend-fail-connect', $this->name );
-                               return $status;
-                       } catch ( Exception $e ) { // some other exception?
-                               $status->fatal( 'backend-fail-internal', $this->name );
-                               $this->logException( $e, __METHOD__, $params );
+                       } catch ( NonEmptyContainerException $e ) {
+                               return $status; // race? consistency delay?
+                       } catch ( CloudFilesException $e ) { // some other exception?
+                               $this->handleException( $e, $status, __METHOD__, $params );
                                return $status;
                        }
                }
@@ -487,11 +630,9 @@ class SwiftFileBackend extends FileBackendStore {
                        );
                } catch ( NoSuchContainerException $e ) {
                } catch ( NoSuchObjectException $e ) {
-               } catch ( InvalidResponseException $e ) {
-                       $stat = null;
-               } catch ( Exception $e ) { // some other exception?
+               } catch ( CloudFilesException $e ) { // some other exception?
                        $stat = null;
-                       $this->logException( $e, __METHOD__, $params );
+                       $this->handleException( $e, null, __METHOD__, $params );
                }
 
                return $stat;
@@ -512,7 +653,8 @@ class SwiftFileBackend extends FileBackendStore {
                $status = Status::newGood();
                $scopeLockS = $this->getScopedFileLocks( array( $path ), LockManager::LOCK_UW, $status );
                if ( $status->isOK() ) {
-                       $tmpFile = $this->getLocalCopy( array( 'src' => $path, 'latest' => 1 ) );
+                       # Do not stat the file in getLocalCopy() to avoid infinite loops
+                       $tmpFile = $this->getLocalCopy( array( 'src' => $path, 'latest' => 1, 'nostat' => 1 ) );
                        if ( $tmpFile ) {
                                $hash = $tmpFile->getSha1Base36();
                                if ( $hash !== false ) {
@@ -543,12 +685,11 @@ class SwiftFileBackend extends FileBackendStore {
                $data = false;
                try {
                        $sContObj = $this->getContainer( $srcCont );
-                       $obj = new CF_Object( $sContObj, $srcRel, false, false ); // skip HEAD request
+                       $obj = new CF_Object( $sContObj, $srcRel, false, false ); // skip HEAD
                        $data = $obj->read( $this->headersFromParams( $params ) );
                } catch ( NoSuchContainerException $e ) {
-               } catch ( InvalidResponseException $e ) {
-               } catch ( Exception $e ) { // some other exception?
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, null, __METHOD__, $params );
                }
 
                return $data;
@@ -565,9 +706,9 @@ class SwiftFileBackend extends FileBackendStore {
                        return ( count( $container->list_objects( 1, null, $prefix ) ) > 0 );
                } catch ( NoSuchContainerException $e ) {
                        return false;
-               } catch ( InvalidResponseException $e ) {
-               } catch ( Exception $e ) { // some other exception?
-                       $this->logException( $e, __METHOD__, array( 'cont' => $fullCont, 'dir' => $dir ) );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, null, __METHOD__,
+                               array( 'cont' => $fullCont, 'dir' => $dir ) );
                }
 
                return null; // error
@@ -642,9 +783,9 @@ class SwiftFileBackend extends FileBackendStore {
                                }
                        }
                } catch ( NoSuchContainerException $e ) {
-               } catch ( InvalidResponseException $e ) {
-               } catch ( Exception $e ) { // some other exception?
-                       $this->logException( $e, __METHOD__, array( 'cont' => $fullCont, 'dir' => $dir ) );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, null, __METHOD__,
+                               array( 'cont' => $fullCont, 'dir' => $dir ) );
                }
 
                return $dirs;
@@ -685,9 +826,9 @@ class SwiftFileBackend extends FileBackendStore {
                        $after = end( $files ); // update last item
                        reset( $files ); // reset pointer
                } catch ( NoSuchContainerException $e ) {
-               } catch ( InvalidResponseException $e ) {
-               } catch ( Exception $e ) { // some other exception?
-                       $this->logException( $e, __METHOD__, array( 'cont' => $fullCont, 'dir' => $dir ) );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, null, __METHOD__,
+                               array( 'cont' => $fullCont, 'dir' => $dir ) );
                }
 
                return $files;
@@ -723,24 +864,17 @@ class SwiftFileBackend extends FileBackendStore {
                } catch ( NoSuchContainerException $e ) {
                        $status->fatal( 'backend-fail-stream', $params['src'] );
                        return $status;
-               } catch ( InvalidResponseException $e ) {
-                       $status->fatal( 'backend-fail-connect', $this->name );
-                       return $status;
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                        return $status;
                }
 
                try {
                        $output = fopen( 'php://output', 'wb' );
-                       $obj = new CF_Object( $cont, $srcRel, false, false ); // skip HEAD request
+                       $obj = new CF_Object( $cont, $srcRel, false, false ); // skip HEAD
                        $obj->stream( $output, $this->headersFromParams( $params ) );
-               } catch ( InvalidResponseException $e ) { // 404? connection problem?
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-               } catch ( Exception $e ) { // some other exception?
-                       $status->fatal( 'backend-fail-stream', $params['src'] );
-                       $this->logException( $e, __METHOD__, $params );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, $status, __METHOD__, $params );
                }
 
                return $status;
@@ -756,7 +890,8 @@ class SwiftFileBackend extends FileBackendStore {
                        return null;
                }
 
-               if ( !$this->fileExists( $params ) ) {
+               # Check the recursion guard to avoid loops when filling metadata
+               if ( empty( $params['nostat'] ) && !$this->fileExists( $params ) ) {
                        return null;
                }
 
@@ -779,11 +914,9 @@ class SwiftFileBackend extends FileBackendStore {
                        }
                } catch ( NoSuchContainerException $e ) {
                        $tmpFile = null;
-               } catch ( InvalidResponseException $e ) {
-                       $tmpFile = null;
-               } catch ( Exception $e ) { // some other exception?
+               } catch ( CloudFilesException $e ) { // some other exception?
                        $tmpFile = null;
-                       $this->logException( $e, __METHOD__, $params );
+                       $this->handleException( $e, null, __METHOD__, $params );
                }
 
                return $tmpFile;
@@ -813,6 +946,36 @@ class SwiftFileBackend extends FileBackendStore {
                return $hdrs;
        }
 
+       /**
+        * @see FileBackendStore::doExecuteOpHandlesInternal()
+        * @return Array List of corresponding Status objects
+        */
+       protected function doExecuteOpHandlesInternal( array $fileOpHandles ) {
+               $statuses = array();
+
+               $cfOps = array(); // list of CF_Async_Op objects
+               foreach ( $fileOpHandles as $index => $fileOpHandle ) {
+                       $cfOps[$index] = $fileOpHandle->cfOp;
+               }
+               $batch = new CF_Async_Op_Batch( $cfOps );
+
+               $cfOps = $batch->execute();
+               foreach ( $cfOps as $index => $cfOp ) {
+                       $status = Status::newGood();
+                       try { // catch exceptions; update status
+                               $function = '_getResponse' . $fileOpHandles[$index]->call;
+                               $this->$function( $cfOp, $status, $fileOpHandles[$index]->params );
+                               $this->purgeCDNCache( $fileOpHandles[$index]->affectedObjects );
+                       } catch ( CloudFilesException $e ) { // some other exception?
+                               $this->handleException( $e, $status,
+                                       __CLASS__ . ":$function", $fileOpHandles[$index]->params );
+                       }
+                       $statuses[$index] = $status;
+               }
+
+               return $statuses;
+       }
+
        /**
         * Set read/write permissions for a Swift container
         *
@@ -837,15 +1000,36 @@ class SwiftFileBackend extends FileBackendStore {
                return $req->execute(); // should return 204
        }
 
+       /**
+        * Purge the CDN cache of affected objects if CDN caching is enabled
+        *
+        * @param $objects Array List of CF_Object items
+        * @return void
+        */
+       public function purgeCDNCache( array $objects ) {
+               if ( $this->swiftUseCDN ) { // Rackspace style CDN
+                       foreach ( $objects as $object ) {
+                               try {
+                                       $object->purge_from_cdn();
+                               } catch ( CDNNotEnabledException $e ) {
+                                       // CDN not enabled; nothing to see here
+                               } catch ( CloudFilesException $e ) {
+                                       $this->handleException( $e, null, __METHOD__,
+                                               array( 'cont' => $object->container->name, 'obj' => $object->name ) );
+                               }
+                       }
+               }
+       }
+
        /**
         * Get a connection to the Swift proxy
         *
         * @return CF_Connection|bool False on failure
-        * @throws InvalidResponseException
+        * @throws CloudFilesException
         */
        protected function getConnection() {
-               if ( $this->conn === false ) {
-                       throw new InvalidResponseException; // failed last attempt
+               if ( $this->connException instanceof Exception ) {
+                       throw $this->connException; // failed last attempt
                }
                // Session keys expire after a while, so we renew them periodically
                if ( $this->conn && ( time() - $this->connStarted ) > $this->authTTL ) {
@@ -853,21 +1037,18 @@ class SwiftFileBackend extends FileBackendStore {
                        $this->conn = null;
                }
                // Authenticate with proxy and get a session key...
-               if ( $this->conn === null ) {
+               if ( !$this->conn ) {
+                       $this->connStarted = 0;
                        $this->connContainers = array();
                        try {
                                $this->auth->authenticate();
                                $this->conn = new CF_Connection( $this->auth );
                                $this->connStarted = time();
-                       } catch ( AuthenticationException $e ) {
-                               $this->conn = false; // don't keep re-trying
-                       } catch ( InvalidResponseException $e ) {
-                               $this->conn = false; // don't keep re-trying
+                       } catch ( CloudFilesException $e ) {
+                               $this->connException = $e; // don't keep re-trying
+                               throw $e; // throw it back
                        }
                }
-               if ( !$this->conn ) {
-                       throw new InvalidResponseException; // auth/connection problem
-               }
                return $this->conn;
        }
 
@@ -885,7 +1066,7 @@ class SwiftFileBackend extends FileBackendStore {
         * @param $container string Container name
         * @param $bypassCache bool Bypass all caches and load from Swift
         * @return CF_Container
-        * @throws InvalidResponseException
+        * @throws CloudFilesException
         */
        protected function getContainer( $container, $bypassCache = false ) {
                $conn = $this->getConnection(); // Swift proxy connection
@@ -954,31 +1135,56 @@ class SwiftFileBackend extends FileBackendStore {
                                        $info['bytes']
                                );
                        }
-               } catch ( InvalidResponseException $e ) {
-               } catch ( Exception $e ) { // some other exception?
-                       $this->logException( $e, __METHOD__, array() );
+               } catch ( CloudFilesException $e ) { // some other exception?
+                       $this->handleException( $e, null, __METHOD__, array() );
                }
        }
 
        /**
-        * Log an unexpected exception for this backend
+        * Log an unexpected exception for this backend.
+        * This also sets the Status object to have a fatal error.
         *
         * @param $e Exception
+        * @param $status Status|null
         * @param $func string
         * @param $params Array
         * @return void
         */
-       protected function logException( Exception $e, $func, array $params ) {
+       protected function handleException( Exception $e, $status, $func, array $params ) {
+               if ( $status instanceof Status ) {
+                       if ( $e instanceof AuthenticationException ) {
+                               $status->fatal( 'backend-fail-connect', $this->name );
+                       } else {
+                               $status->fatal( 'backend-fail-internal', $this->name );
+                       }
+               }
+               if ( $e->getMessage() ) {
+                       trigger_error( "$func: " . $e->getMessage(), E_USER_WARNING );
+               }
                wfDebugLog( 'SwiftBackend',
                        get_class( $e ) . " in '{$func}' (given '" . FormatJson::encode( $params ) . "')" .
-                       ( $e instanceof InvalidResponseException
-                               ? ": {$e->getMessage()}"
-                               : ""
-                       )
+                       ( $e->getMessage() ? ": {$e->getMessage()}" : "" )
                );
        }
 }
 
+/**
+ * @see FileBackendStoreOpHandle
+ */
+class SwiftFileOpHandle extends FileBackendStoreOpHandle {
+       /** @var CF_Async_Op */
+       public $cfOp;
+       /** @var Array */
+       public $affectedObjects = array();
+
+       public function __construct( $backend, array $params, $call, CF_Async_Op $cfOp ) {
+               $this->backend = $backend;
+               $this->params = $params;
+               $this->call = $call;
+               $this->cfOp = $cfOp;
+       }
+}
+
 /**
  * SwiftFileBackend helper class to page through listings.
  * Swift also has a listing limit of 10,000 objects for sanity.
index 078f3be..0be9a74 100644 (file)
@@ -33,7 +33,7 @@ class DBFileJournal extends FileJournal {
         * Construct a new instance from configuration.
         * $config includes:
         *     'wiki' : wiki name to use for LoadBalancer
-        * 
+        *
         * @param $config Array
         */
        protected function __construct( array $config ) {
@@ -44,16 +44,18 @@ class DBFileJournal extends FileJournal {
 
        /**
         * @see FileJournal::logChangeBatch()
-        * @return Status 
+        * @return Status
         */
        protected function doLogChangeBatch( array $entries, $batchId ) {
                $status = Status::newGood();
 
-               $dbw = $this->getMasterDB();
-               if ( !$dbw ) {
+               try {
+                       $dbw = $this->getMasterDB();
+               } catch ( DBError $e ) {
                        $status->fatal( 'filejournal-fail-dbconnect', $this->backend );
                        return $status;
                }
+
                $now = wfTimestamp( TS_UNIX );
 
                $data = array();
@@ -81,9 +83,39 @@ class DBFileJournal extends FileJournal {
                return $status;
        }
 
+       /**
+        * @see FileJournal::doGetChangeEntries()
+        * @return Array
+        * @throws DBError
+        */
+       protected function doGetChangeEntries( $start, $limit ) {
+               $dbw = $this->getMasterDB();
+
+               $res = $dbw->select( 'filejournal', '*',
+                       array(
+                               'fj_backend' => $this->backend,
+                               'fj_id >= ' . $dbw->addQuotes( (int)$start ) ), // $start may be 0
+                       __METHOD__,
+                       array_merge( array( 'ORDER BY' => 'fj_id ASC' ),
+                               $limit ? array( 'LIMIT' => $limit ) : array() )
+               );
+
+               $entries = array();
+               foreach ( $res as $row ) {
+                       $item = array();
+                       foreach ( (array)$row as $key => $value ) {
+                               $item[substr( $key, 3 )] = $value; // "fj_op" => "op"
+                       }
+                       $entries[] = $item;
+               }
+
+               return $entries;
+       }
+
        /**
         * @see FileJournal::purgeOldLogs()
         * @return Status
+        * @throws DBError
         */
        protected function doPurgeOldLogs() {
                $status = Status::newGood();
@@ -92,38 +124,26 @@ class DBFileJournal extends FileJournal {
                }
 
                $dbw = $this->getMasterDB();
-               if ( !$dbw ) {
-                       $status->fatal( 'filejournal-fail-dbconnect', $this->backend );
-                       return $status;
-               }
                $dbCutoff = $dbw->timestamp( time() - 86400 * $this->ttlDays );
 
-               try {
-                       $dbw->begin();
-                       $dbw->delete( 'filejournal',
-                               array( 'fj_timestamp < ' . $dbw->addQuotes( $dbCutoff ) ),
-                               __METHOD__
-                       );
-                       $dbw->commit();
-               } catch ( DBError $e ) {
-                       $status->fatal( 'filejournal-fail-dbquery', $this->backend );
-                       return $status;
-               }
+               $dbw->begin();
+               $dbw->delete( 'filejournal',
+                       array( 'fj_timestamp < ' . $dbw->addQuotes( $dbCutoff ) ),
+                       __METHOD__
+               );
+               $dbw->commit();
 
                return $status;
        }
 
        /**
         * Get a master connection to the logging DB
-        * 
-        * @return DatabaseBase|null 
+        *
+        * @return DatabaseBase
+        * @throws DBError
         */
        protected function getMasterDB() {
-               try {
-                       $lb = wfGetLBFactory()->newMainLB();
-                       return $lb->getConnection( DB_MASTER, array(), $this->wiki );
-               } catch ( DBConnectionError $e ) {
-                       return null;
-               }
+               $lb = wfGetLBFactory()->newMainLB();
+               return $lb->getConnection( DB_MASTER, array(), $this->wiki );
        }
 }
index 99f2887..d34b778 100644 (file)
@@ -43,7 +43,7 @@ abstract class FileJournal {
         * Construct a new instance from configuration.
         * $config includes:
         *     'ttlDays' : days to keep log entries around (false means "forever")
-        * 
+        *
         * @param $config Array
         */
        protected function __construct( array $config ) {
@@ -52,7 +52,7 @@ abstract class FileJournal {
 
        /**
         * Create an appropriate FileJournal object from config
-        * 
+        *
         * @param $config Array
         * @param $backend string A registered file backend name
         * @return FileJournal
@@ -69,7 +69,7 @@ abstract class FileJournal {
 
        /**
         * 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() {
@@ -88,7 +88,7 @@ abstract class FileJournal {
         *     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 $entries Array List of file operations (each an array of parameters)
         * @param $batchId string UUID string that identifies the operation batch
         * @return Status
@@ -102,17 +102,54 @@ abstract class FileJournal {
 
        /**
         * @see FileJournal::logChangeBatch()
-        * 
+        *
         * @param $entries Array List of file operations (each an array of parameters)
         * @param $batchId string UUID string that identifies the operation batch
         * @return Status
         */
        abstract protected function doLogChangeBatch( array $entries, $batchId );
 
+       /**
+        * Get an array of file change log entries.
+        * A starting change ID and/or limit can be specified.
+        *
+        * The result as a 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)
+        *     path       : affected storage path
+        *     path_sha1  : base 36 sha1 of the affected storage path
+        *     timestamp  : TS_MW timestamp of the batch change
+
+        * Also, $next is updated to the ID of the next entry.
+        *
+        * @param $start integer Starting change ID or null
+        * @param $limit integer Maximum number of items to return
+        * @param &$next string
+        * @return Array
+        */
+       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()
+        * @return Array
+        */
+       abstract protected function doGetChangeEntries( $start, $limit );
+
        /**
         * Purge any old log entries
-        * 
-        * @return Status 
+        *
+        * @return Status
         */
        final public function purgeOldLogs() {
                return $this->doPurgeOldLogs();
@@ -132,12 +169,20 @@ abstract class FileJournal {
 class NullFileJournal extends FileJournal {
        /**
         * @see FileJournal::logChangeBatch()
-        * @return Status 
+        * @return Status
         */
        protected function doLogChangeBatch( array $entries, $batchId ) {
                return Status::newGood();
        }
 
+       /**
+        * @see FileJournal::doGetChangeEntries()
+        * @return Array
+        */
+       protected function doGetChangeEntries( $start, $limit ) {
+               return array();
+       }
+
        /**
         * @see FileJournal::purgeOldLogs()
         * @return Status
index f711f8d..7ccf00d 100644 (file)
@@ -61,8 +61,10 @@ class RefreshLinksJob extends Job {
                $parserOutput = $wgParser->parse( $revision->getText(), $this->title, $options, true, true, $revision->getId() );
                wfProfileOut( __METHOD__.'-parse' );
                wfProfileIn( __METHOD__.'-update' );
-               $update = new LinksUpdate( $this->title, $parserOutput, false );
-               $update->doUpdate();
+
+               $updates = $parserOutput->getSecondaryDataUpdates( $this->title, false );
+               DataUpdate::runUpdates( $updates );
+
                wfProfileOut( __METHOD__.'-update' );
                wfProfileOut( __METHOD__ );
                return true;
@@ -133,8 +135,10 @@ class RefreshLinksJob2 extends Job {
                        $parserOutput = $wgParser->parse( $revision->getText(), $title, $options, true, true, $revision->getId() );
                        wfProfileOut( __METHOD__.'-parse' );
                        wfProfileIn( __METHOD__.'-update' );
-                       $update = new LinksUpdate( $title, $parserOutput, false );
-                       $update->doUpdate();
+
+                       $updates = $parserOutput->getSecondaryDataUpdates( $title, false );
+                       DataUpdate::runUpdates( $updates );
+
                        wfProfileOut( __METHOD__.'-update' );
                        wfWaitForSlaves();
                }
index 88f3484..3891f34 100644 (file)
@@ -68,7 +68,7 @@ class LogPage {
        }
 
        /**
-        * @return bool|int|null
+        * @return int log_id of the inserted log entry
         */
        protected function saveContent() {
                global $wgLogRestrictions;
@@ -105,7 +105,7 @@ class LogPage {
                } elseif( $this->sendToUDP ) {
                        # Don't send private logs to UDP
                        if( isset( $wgLogRestrictions[$this->type] ) && $wgLogRestrictions[$this->type] != '*' ) {
-                               return true;
+                               return $newId;
                        }
 
                        # Notify external application via UDP.
@@ -438,8 +438,7 @@ class LogPage {
         * @param $params Array: parameters passed later to wfMsg.* functions
         * @param $doer User object: the user doing the action
         *
-        * @return bool|int|null
-        * @TODO: make this use LogEntry::saveContent()
+        * @return int log_id of the inserted log entry
         */
        public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) {
                global $wgContLang;
index cdb66c4..2b26640 100644 (file)
@@ -66,7 +66,7 @@ abstract class BagOStuff {
         * @param $keys Array List of strings
         * @return Array
         */
-       public function getBatch( array $keys ) {
+       public function getMulti( array $keys ) {
                $res = array();
                foreach ( $keys as $key ) {
                        $res[$key] = $this->get( $key );
@@ -87,7 +87,7 @@ abstract class BagOStuff {
         * Delete an item.
         * @param $key string
         * @param $time int Amount of time to delay the operation (mostly memcached-specific)
-        * @return bool success
+        * @return bool True if the item was deleted or not found, false on failure
         */
        abstract public function delete( $key, $time = 0 );
 
diff --git a/includes/objectcache/MemcachedBagOStuff.php b/includes/objectcache/MemcachedBagOStuff.php
new file mode 100644 (file)
index 0000000..49cad8c
--- /dev/null
@@ -0,0 +1,172 @@
+<?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 Cache
+ */
+
+/**
+ * Base class for memcached clients.
+ *
+ * @ingroup Cache
+ */
+class MemcachedBagOStuff extends BagOStuff {
+       protected $client;
+
+       /**
+        * Fill in the defaults for any parameters missing from $params, using the
+        * backwards-compatible global variables
+        */
+       protected function applyDefaultParams( $params ) {
+               if ( !isset( $params['servers'] ) ) {
+                       $params['servers'] = $GLOBALS['wgMemCachedServers'];
+               }
+               if ( !isset( $params['debug'] ) ) {
+                       $params['debug'] = $GLOBALS['wgMemCachedDebug'];
+               }
+               if ( !isset( $params['persistent'] ) ) {
+                       $params['persistent'] = $GLOBALS['wgMemCachedPersistent'];
+               }
+               if  ( !isset( $params['compress_threshold'] ) ) {
+                       $params['compress_threshold'] = 1500;
+               }
+               if ( !isset( $params['timeout'] ) ) {
+                       $params['timeout'] = $GLOBALS['wgMemCachedTimeout'];
+               }
+               if ( !isset( $params['connect_timeout'] ) ) {
+                       $params['connect_timeout'] = 0.1;
+               }
+               return $params;
+       }
+
+       /**
+        * @param $key string
+        * @return Mixed
+        */
+       public function get( $key ) {
+               return $this->client->get( $this->encodeKey( $key ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $value
+        * @param $exptime int
+        * @return bool
+        */
+       public function set( $key, $value, $exptime = 0 ) {
+               return $this->client->set( $this->encodeKey( $key ), $value,
+                       $this->fixExpiry( $exptime ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $time int
+        * @return bool
+        */
+       public function delete( $key, $time = 0 ) {
+               return $this->client->delete( $this->encodeKey( $key ), $time );
+       }
+
+       /**
+        * @param $key string
+        * @param $value int
+        * @return Mixed
+        */
+       public function add( $key, $value, $exptime = 0 ) {
+               return $this->client->add( $this->encodeKey( $key ), $value,
+                       $this->fixExpiry( $exptime ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $value int
+        * @param $exptime
+        * @return Mixed
+        */
+       public function replace( $key, $value, $exptime = 0 ) {
+               return $this->client->replace( $this->encodeKey( $key ), $value, 
+                       $this->fixExpiry( $exptime ) );
+       }
+
+       /**
+        * Get the underlying client object. This is provided for debugging
+        * purposes.
+        */
+       public function getClient() {
+               return $this->client;
+       }
+
+       /**
+        * Encode a key for use on the wire inside the memcached protocol.
+        *
+        * We encode spaces and line breaks to avoid protocol errors. We encode
+        * the other control characters for compatibility with libmemcached
+        * verify_key. We leave other punctuation alone, to maximise backwards
+        * compatibility.
+        * @return string
+        */
+       public function encodeKey( $key ) {
+               return preg_replace_callback( '/[\x00-\x20\x25\x7f]+/',
+                       array( $this, 'encodeKeyCallback' ), $key );
+       }
+
+       protected function encodeKeyCallback( $m ) {
+               return rawurlencode( $m[0] );
+       }
+
+       /**
+        * TTLs higher than 30 days will be detected as absolute TTLs
+        * (UNIX timestamps), and will result in the cache entry being
+        * discarded immediately because the expiry is in the past.
+        * Clamp expiries >30d at 30d, unless they're >=1e9 in which
+        * case they are likely to really be absolute (1e9 = 2011-09-09)
+        */
+       function fixExpiry( $expiry ) {
+               if ( $expiry > 2592000 && $expiry < 1000000000 ) {
+                       $expiry = 2592000;
+               }
+               return $expiry;
+       }
+
+       /**
+        * Decode a key encoded with encodeKey(). This is provided as a convenience
+        * function for debugging.
+        *
+        * @param $key string
+        *
+        * @return string
+        */
+       public function decodeKey( $key ) {
+               return urldecode( $key );
+       }
+
+       /**
+        * Send a debug message to the log
+        */
+       protected function debugLog( $text ) {
+               global $wgDebugLogGroups;
+               if( !isset( $wgDebugLogGroups['memcached'] ) ) {
+                       # Prefix message since it will end up in main debug log file
+                       $text = "memcached: $text";
+               }
+               if ( substr( $text, -1 ) !== "\n" ) {
+                       $text .= "\n";
+               }
+               wfDebugLog( 'memcached', $text );
+       }
+}
+
index e816078..9602ffe 100644 (file)
@@ -832,7 +832,7 @@ class MWMemcached {
         * @access private
         */
        function _hashfunc( $key ) {
-               # Hash function must on [0,0x7ffffff]
+               # Hash function must be in [0,0x7ffffff]
                # We take the first 31 bits of the MD5 hash, which unlike the hash
                # function used in a previous version of this client, works
                return hexdec( substr( md5( $key ), 0, 8 ) ) & 0x7fffffff;
@@ -979,15 +979,6 @@ class MWMemcached {
                        $this->stats[$cmd] = 1;
                }
 
-               // TTLs higher than 30 days will be detected as absolute TTLs
-               // (UNIX timestamps), and will result in the cache entry being
-               // discarded immediately because the expiry is in the past.
-               // Clamp expiries >30d at 30d, unless they're >=1e9 in which
-               // case they are likely to really be absolute (1e9 = 2011-09-09)
-               if ( $exp > 2592000 && $exp < 1000000000 ) {
-                       $exp = 2592000;
-               }
-
                $flags = 0;
 
                if ( !is_scalar( $val ) ) {
diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php b/includes/objectcache/MemcachedPeclBagOStuff.php
new file mode 100644 (file)
index 0000000..c3ba9ea
--- /dev/null
@@ -0,0 +1,206 @@
+<?php
+
+/**
+ * A wrapper class for the PECL memcached client
+ * 
+ * @ingroup Cache
+ */
+class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
+
+       /**
+        * Constructor
+        *
+        * Available parameters are:
+        *   - servers:             The list of IP:port combinations holding the memcached servers.
+        *   - persistent:          Whether to use a persistent connection
+        *   - compress_threshold:  The minimum size an object must be before it is compressed
+        *   - timeout:             The read timeout in microseconds
+        *   - connect_timeout:     The connect timeout in seconds
+        *   - serializer:          May be either "php" or "igbinary". Igbinary produces more compact 
+        *                          values, but serialization is much slower unless the php.ini option
+        *                          igbinary.compact_strings is off.
+        */
+       function __construct( $params ) {
+               $params = $this->applyDefaultParams( $params );
+
+               if ( $params['persistent'] ) {
+                       $this->client = new Memcached( __CLASS__ );
+               } else {
+                       $this->client = new Memcached;
+               }
+
+               if ( !isset( $params['serializer'] ) ) {
+                       $params['serializer'] = 'php';
+               }
+
+               // The compression threshold is an undocumented php.ini option for some 
+               // reason. There's probably not much harm in setting it globally, for 
+               // compatibility with the settings for the PHP client.
+               ini_set( 'memcached.compression_threshold', $params['compress_threshold'] );
+
+               // Set timeouts
+               $this->client->setOption( Memcached::OPT_CONNECT_TIMEOUT, $params['connect_timeout'] * 1000 );
+               $this->client->setOption( Memcached::OPT_SEND_TIMEOUT, $params['timeout'] );
+               $this->client->setOption( Memcached::OPT_RECV_TIMEOUT, $params['timeout'] );
+               $this->client->setOption( Memcached::OPT_POLL_TIMEOUT, $params['timeout'] / 1000 );
+
+               // Set libketama mode since it's recommended by the documentation and 
+               // is as good as any. There's no way to configure libmemcached to use
+               // hashes identical to the ones currently in use by the PHP client, and
+               // even implementing one of the libmemcached hashes in pure PHP for 
+               // forwards compatibility would require MWMemcached::get_sock() to be
+               // rewritten.
+               $this->client->setOption( Memcached::OPT_LIBKETAMA_COMPATIBLE, true );
+
+               // Set the serializer
+               switch ( $params['serializer'] ) {
+                       case 'php':
+                               $this->client->setOption( Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_PHP );
+                               break;
+                       case 'igbinary':
+                               if ( !Memcached::HAVE_IGBINARY ) {
+                                       throw new MWException( __CLASS__.': the igbinary extension is not available ' . 
+                                               'but igbinary serialization was requested.' );
+                               }
+                               $this->client->setOption( Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY );
+                               break;
+                       default:
+                               throw new MWException( __CLASS__.': invalid value for serializer parameter' );
+               }
+               foreach ( $params['servers'] as $host ) {
+                       list( $ip, $port ) = IP::splitHostAndPort( $host );
+                       $this->client->addServer( $ip, $port );
+               }
+       }
+
+       /**
+        * @param $key string
+        * @return Mixed
+        */
+       public function get( $key ) {
+               $this->debugLog( "get($key)" );
+               return $this->checkResult( $key, parent::get( $key ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $value
+        * @param $exptime int
+        * @return bool
+        */
+       public function set( $key, $value, $exptime = 0 ) {
+               $this->debugLog( "set($key)" );
+               return $this->checkResult( $key, parent::set( $key, $value, $exptime ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $time int
+        * @return bool
+        */
+       public function delete( $key, $time = 0 ) {
+               $this->debugLog( "delete($key)" );
+               $result = parent::delete( $key, $time );
+               if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
+                       // "Not found" is counted as success in our interface
+                       return true;
+               } else {
+                       return $this->checkResult( $key, $result );
+               }
+       }
+
+       /**
+        * @param $key string
+        * @param $value int
+        * @return Mixed
+        */
+       public function add( $key, $value, $exptime = 0 ) {
+               $this->debugLog( "add($key)" );
+               return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $value int
+        * @param $exptime
+        * @return Mixed
+        */
+       public function replace( $key, $value, $exptime = 0 ) {
+               $this->debugLog( "replace($key)" );
+               return $this->checkResult( $key, parent::replace( $key, $value, $exptime ) );
+       }
+
+       /**
+        * @param $key string
+        * @param $value int
+        * @return Mixed
+        */
+       public function incr( $key, $value = 1 ) {
+               $this->debugLog( "incr($key)" );
+               $result = $this->client->increment( $key, $value );
+               return $this->checkResult( $key, $result );
+       }
+
+       /**
+        * @param $key string
+        * @param $value int
+        * @return Mixed
+        */
+       public function decr( $key, $value = 1 ) {
+               $this->debugLog( "decr($key)" );
+               $result = $this->client->decrement( $key, $value );
+               return $this->checkResult( $key, $result );
+       }
+
+       /**
+        * Check the return value from a client method call and take any necessary 
+        * action. Returns the value that the wrapper function should return. At 
+        * present, the return value is always the same as the return value from
+        * the client, but some day we might find a case where it should be 
+        * different.
+        * 
+        * @param $key The key used by the caller, or false if there wasn't one.
+        * @param $result The return value
+        */
+       protected function checkResult( $key, $result ) {
+               if ( $result !== false ) {
+                       return $result;
+               }
+               switch ( $this->client->getResultCode() ) {
+                       case Memcached::RES_SUCCESS:
+                               break;
+                       case Memcached::RES_DATA_EXISTS:
+                       case Memcached::RES_NOTSTORED:
+                       case Memcached::RES_NOTFOUND:
+                               $this->debugLog( "result: " . $this->client->getResultMessage() );
+                               break;
+                       default:
+                               $msg = $this->client->getResultMessage();
+                               if ( $key !== false ) {
+                                       $server = $this->client->getServerByKey( $key );
+                                       $serverName = "{$server['host']}:{$server['port']}";
+                                       $msg = "Memcached error for key \"$key\" on server \"$serverName\": $msg";
+                               } else {
+                                       $msg = "Memcached error: $msg";
+                               }
+                               wfDebugLog( 'memcached-serious', $msg );
+               }
+               return $result;
+       }
+
+       /**
+        * @param $keys Array
+        * @return Array
+        */
+       public function getMulti( array $keys ) {
+               $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
+               $callback = array( $this, 'encodeKey' );
+               $result = $this->client->getMulti( array_map( $callback, $keys ) );
+               return $this->checkResult( false, $result );
+       }
+
+       /* NOTE: there is no cas() method here because it is currently not supported 
+        * by the BagOStuff interface and other BagOStuff subclasses, such as 
+        * SqlBagOStuff.
+        */
+}
index 79f3241..c562134 100644 (file)
  *
  * @ingroup Cache
  */
-class MemcachedPhpBagOStuff extends BagOStuff {
-
-       /**
-        * @var MemCachedClientforWiki
-        */
-       protected $client;
+class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
 
        /**
         * Constructor.
@@ -47,24 +42,7 @@ class MemcachedPhpBagOStuff extends BagOStuff {
         * @param $params array
         */
        function __construct( $params ) {
-               if ( !isset( $params['servers'] ) ) {
-                       $params['servers'] = $GLOBALS['wgMemCachedServers'];
-               }
-               if ( !isset( $params['debug'] ) ) {
-                       $params['debug'] = $GLOBALS['wgMemCachedDebug'];
-               }
-               if ( !isset( $params['persistent'] ) ) {
-                       $params['persistent'] = $GLOBALS['wgMemCachedPersistent'];
-               }
-               if  ( !isset( $params['compress_threshold'] ) ) {
-                       $params['compress_threshold'] = 1500;
-               }
-               if ( !isset( $params['timeout'] ) ) {
-                       $params['timeout'] = $GLOBALS['wgMemCachedTimeout'];
-               }
-               if ( !isset( $params['connect_timeout'] ) ) {
-                       $params['connect_timeout'] = 0.1;
-               }
+               $params = $this->applyDefaultParams( $params );
 
                $this->client = new MemCachedClientforWiki( $params );
                $this->client->set_servers( $params['servers'] );
@@ -78,42 +56,15 @@ class MemcachedPhpBagOStuff extends BagOStuff {
                $this->client->set_debug( $debug );
        }
 
-       /**
-        * @param $key string
-        * @return Mixed
-        */
-       public function get( $key ) {
-               return $this->client->get( $this->encodeKey( $key ) );
-       }
-
        /**
         * @param $keys Array
         * @return Array
         */
-       public function getBatch( array $keys ) {
+       public function getMulti( array $keys ) {
                $callback = array( $this, 'encodeKey' );
                return $this->client->get_multi( array_map( $callback, $keys ) );
        }
 
-       /**
-        * @param $key string
-        * @param $value
-        * @param $exptime int
-        * @return bool
-        */
-       public function set( $key, $value, $exptime = 0 ) {
-               return $this->client->set( $this->encodeKey( $key ), $value, $exptime );
-       }
-
-       /**
-        * @param $key string
-        * @param $time int
-        * @return bool
-        */
-       public function delete( $key, $time = 0 ) {
-               return $this->client->delete( $this->encodeKey( $key ), $time );
-       }
-
        /**
         * @param $key
         * @param $timeout int
@@ -130,26 +81,7 @@ class MemcachedPhpBagOStuff extends BagOStuff {
        public function unlock( $key ) {
                return $this->client->unlock( $this->encodeKey( $key ) );
        }
-
-       /**
-        * @param $key string
-        * @param $value int
-        * @return Mixed
-        */
-       public function add( $key, $value, $exptime = 0 ) {
-               return $this->client->add( $this->encodeKey( $key ), $value, $exptime );
-       }
-
-       /**
-        * @param $key string
-        * @param $value int
-        * @param $exptime
-        * @return Mixed
-        */
-       public function replace( $key, $value, $exptime = 0 ) {
-               return $this->client->replace( $this->encodeKey( $key ), $value, $exptime );
-       }
-
+       
        /**
         * @param $key string
         * @param $value int
@@ -167,45 +99,5 @@ class MemcachedPhpBagOStuff extends BagOStuff {
        public function decr( $key, $value = 1 ) {
                return $this->client->decr( $this->encodeKey( $key ), $value );
        }
-
-       /**
-        * Get the underlying client object. This is provided for debugging
-        * purposes.
-        *
-        * @return MemCachedClientforWiki
-        */
-       public function getClient() {
-               return $this->client;
-       }
-
-       /**
-        * Encode a key for use on the wire inside the memcached protocol.
-        *
-        * We encode spaces and line breaks to avoid protocol errors. We encode
-        * the other control characters for compatibility with libmemcached
-        * verify_key. We leave other punctuation alone, to maximise backwards
-        * compatibility.
-        * @return string
-        */
-       public function encodeKey( $key ) {
-               return preg_replace_callback( '/[\x00-\x20\x25\x7f]+/',
-                       array( $this, 'encodeKeyCallback' ), $key );
-       }
-
-       protected function encodeKeyCallback( $m ) {
-               return rawurlencode( $m[0] );
-       }
-
-       /**
-        * Decode a key encoded with encodeKey(). This is provided as a convenience
-        * function for debugging.
-        *
-        * @param $key string
-        *
-        * @return string
-        */
-       public function decodeKey( $key ) {
-               return urldecode( $key );
-       }
 }
 
index a59ca05..2e00e16 100644 (file)
@@ -132,8 +132,10 @@ class ObjectCache {
 
        /**
         * Factory function that creates a memcached client object.
-        * The idea of this is that it might eventually detect and automatically
-        * support the PECL extension, assuming someone can get it to compile.
+        *
+        * This always uses the PHP client, since the PECL client has a different 
+        * hashing scheme and a different interpretation of the flags bitfield, so 
+        * switching between the two clients randomly would be disasterous.
         *
         * @param $params array
         *
index 54a67e0..e504887 100644 (file)
@@ -139,11 +139,11 @@ class SqlBagOStuff extends BagOStuff {
        }
 
        public function get( $key ) {
-               $values = $this->getBatch( array( $key ) );
+               $values = $this->getMulti( array( $key ) );
                return $values[$key];
        }
 
-       public function getBatch( array $keys ) {
+       public function getMulti( array $keys ) {
                $values = array(); // array of (key => value)
 
                $keysByTableName = array();
index 6340787..d929f1a 100644 (file)
@@ -155,8 +155,9 @@ class ParserOutput extends CacheTime {
                $mProperties = array(),       # Name/value pairs to be cached in the DB
                $mTOCHTML = '',               # HTML of the TOC
                $mTimestamp;                  # Timestamp of the revision
-       private $mIndexPolicy = '';       # 'index' or 'noindex'?  Any other value will result in no change.
-       private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
+               private $mIndexPolicy = '';       # 'index' or 'noindex'?  Any other value will result in no change.
+               private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
+               private $mSecondaryDataUpdates = array(); # List of instances of SecondaryDataObject(), used to cause some information extracted from the page in a custom place.
 
        const EDITSECTION_REGEX = '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
 
@@ -463,4 +464,40 @@ class ParserOutput extends CacheTime {
         function recordOption( $option ) {
                 $this->mAccessedOptions[$option] = true;
         }
+
+       /**
+        * Adds an update job to the output. Any update jobs added to the output will eventually bexecuted in order to
+        * store any secondary information extracted from the page's content.
+        *
+        * @param StorageUpdate $update
+        */
+       public function addSecondaryDataUpdate( DataUpdate $update ) {
+               $this->mSecondaryDataUpdates[] = $update;
+       }
+
+       /**
+        * Returns any DataUpdate jobs to be executed in order to store secondary information
+        * extracted from the page's content, including a LinksUpdate object for all links stored in
+        * this ParserOutput object.
+        *
+        * @param $title Title of the page we're updating. If not given, a title object will be created based on $this->getTitleText()
+        * @param $recursive Boolean: queue jobs for recursive updates?
+        *
+        * @return Array. An array of instances of DataUpdate
+        */
+       public function getSecondaryDataUpdates( Title $title = null, $recursive = true ) {
+               if ( !$title ) {
+                       $title = Title::newFromText( $this->getTitleText() );
+               }
+
+               $linksUpdate = new LinksUpdate( $title, $this, $recursive );
+
+               if ( !$this->mSecondaryDataUpdates ) {
+                       return array( $linksUpdate );
+               } else {
+                       $updates = array_merge( $this->mSecondaryDataUpdates, array( $linksUpdate ) );
+               }
+
+               return $updates;
+        }
 }
index 602d88f..5bb951b 100644 (file)
@@ -56,7 +56,7 @@ class Preprocessor_DOM implements Preprocessor {
        }
 
        /**
-        * @param $args
+        * @param $args array
         * @return PPCustomFrame_DOM
         */
        function newCustomFrame( $args ) {
index dc2d63a..32ba707 100644 (file)
@@ -47,7 +47,7 @@ class Preprocessor_Hash implements Preprocessor {
        }
 
        /**
-        * @param $args
+        * @param $args array
         * @return PPCustomFrame_Hash
         */
        function newCustomFrame( $args ) {
index b30b096..d7b0716 100644 (file)
@@ -33,6 +33,9 @@ class Preprocessor_HipHop implements Preprocessor {
 
        const CACHE_VERSION = 1;
 
+       /**
+        * @param $parser Parser
+        */
        function __construct( $parser ) {
                $this->parser = $parser;
        }
@@ -45,7 +48,7 @@ class Preprocessor_HipHop implements Preprocessor {
        }
 
        /**
-        * @param $args
+        * @param $args array
         * @return PPCustomFrame_HipHop
         */
        function newCustomFrame( array $args ) {
@@ -103,6 +106,7 @@ class Preprocessor_HipHop implements Preprocessor {
         * cache may be implemented at a later date which takes further advantage of these strict
         * dependency requirements.
         *
+        * @throws MWException
         * @return PPNode_HipHop_Tree
         */
        function preprocessToObj( string $text, int $flags = 0 ) {
@@ -830,16 +834,23 @@ class PPDStack_HipHop {
  * @ingroup Parser
  */
 class PPDStackElement_HipHop {
-       var $open,                      // Opening character (\n for heading)
-               $close,             // Matching closing character
+       var $open,              // Opening character (\n for heading)
+               $close,             // Matching closing character
                $count,             // Number of opening characters found (number of "=" for heading)
                $parts,             // Array of PPDPart objects describing pipe-separated parts.
                $lineStart;         // True if the open char appeared at the start of the input line. Not set for headings.
 
+       /**
+        * @param $obj PPDStackElement_HipHop
+        * @return PPDStackElement_HipHop
+        */
        static function cast( PPDStackElement_HipHop $obj ) {
                return $obj;
        }
 
+       /**
+        * @param $data array
+        */
        function __construct( $data = array() ) {
                $this->parts = array( new PPDPart_HipHop );
 
@@ -848,14 +859,23 @@ class PPDStackElement_HipHop {
                }
        }
 
+       /**
+        * @return PPDAccum_HipHop
+        */
        function getAccum() {
                return PPDAccum_HipHop::cast( $this->parts[count($this->parts) - 1]->out );
        }
 
+       /**
+        * @param $s string
+        */
        function addPart( $s = '' ) {
                $this->parts[] = new PPDPart_HipHop( $s );
        }
 
+       /**
+        * @return PPDPart_HipHop
+        */
        function getCurrentPart() {
                return PPDPart_HipHop::cast( $this->parts[count($this->parts) - 1] );
        }
@@ -876,6 +896,7 @@ class PPDStackElement_HipHop {
        /**
         * Get the accumulator that would result if the close is not found.
         *
+        * @param $openingCount bool
         * @return PPDAccum_HipHop
         */
        function breakSyntax( $openingCount = false ) {
@@ -1041,9 +1062,10 @@ class PPFrame_HipHop implements PPFrame {
         * Create a new child frame
         * $args is optionally a multi-root PPNode or array containing the template arguments
         *
-        * @param $args PPNode_HipHop_Array|array
-        * @param $title Title|false
+        * @param $args PPNode_HipHop_Array|array|bool
+        * @param $title Title|bool
         *
+        * @throws MWException
         * @return PPTemplateFrame_HipHop
         */
        function newChild( $args = false, $title = false ) {
@@ -1293,6 +1315,7 @@ class PPFrame_HipHop implements PPFrame {
        /**
         * Implode with no flags specified
         * This previously called implodeWithFlags but has now been inlined to reduce stack depth
+        * @param $sep
         * @return string
         */
        function implode( $sep /*, ... */ ) {
@@ -1323,6 +1346,7 @@ class PPFrame_HipHop implements PPFrame {
         * Makes an object that, when expand()ed, will be the same as one obtained
         * with implode()
         *
+        * @param $sep
         * @return PPNode_HipHop_Array
         */
        function virtualImplode( $sep /*, ... */ ) {
@@ -1352,6 +1376,9 @@ class PPFrame_HipHop implements PPFrame {
        /**
         * Virtual implode with brackets
         *
+        * @param $start
+        * @param $sep
+        * @param $end
         * @return PPNode_HipHop_Array
         */
        function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
@@ -1472,11 +1499,11 @@ class PPTemplateFrame_HipHop extends PPFrame_HipHop {
        var $numberedExpansionCache, $namedExpansionCache;
 
        /**
-        * @param $preprocessor
-        * @param $parent
+        * @param $preprocessor Preprocessor_HipHop
+        * @param $parent bool
         * @param $numberedArgs array
         * @param $namedArgs array
-        * @param $title Title
+        * @param $title Title|bool
         */
        function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
                parent::__construct( $preprocessor );
@@ -1723,6 +1750,10 @@ class PPNode_HipHop_Tree implements PPNode {
                return $this->nextSibling;
        }
 
+       /**
+        * @param $name string
+        * @return array
+        */
        function getChildrenOfType( $name ) {
                $children = array();
                for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) {
@@ -1761,6 +1792,7 @@ class PPNode_HipHop_Tree implements PPNode {
         *    index         String index
         *    value         PPNode value
         *
+        * @throws MWException
         * @return array
         */
        function splitArg() {
@@ -1794,6 +1826,7 @@ class PPNode_HipHop_Tree implements PPNode {
         * Split an <ext> node into an associative array containing name, attr, inner and close
         * All values in the resulting array are PPNodes. Inner and close are optional.
         *
+        * @throws MWException
         * @return array
         */
        function splitExt() {
@@ -1821,6 +1854,7 @@ class PPNode_HipHop_Tree implements PPNode {
        /**
         * Split an <h> node
         *
+        * @throws MWException
         * @return array
         */
        function splitHeading() {
index 42fd873..9e88494 100644 (file)
@@ -685,6 +685,7 @@ class ResourceLoader {
                }
 
                // Generate output
+               $isRaw = false;
                foreach ( $modules as $name => $module ) {
                        /**
                         * @var $module ResourceLoaderModule
@@ -763,15 +764,14 @@ class ResourceLoader {
                                $missing[] = $name;
                                unset( $modules[$name] );
                        }
+                       $isRaw |= $module->isRaw();
                        wfProfileOut( __METHOD__ . '-' . $name );
                }
 
                // Update module states
-               if ( $context->shouldIncludeScripts() ) {
+               if ( $context->shouldIncludeScripts() && !$context->getRaw() && !$isRaw ) {
                        // Set the state of modules loaded as only scripts to ready
-                       if ( count( $modules ) && $context->getOnly() === 'scripts'
-                               && !isset( $modules['startup'] ) )
-                       {
+                       if ( count( $modules ) && $context->getOnly() === 'scripts' ) {
                                $out .= self::makeLoaderStateScript(
                                        array_fill_keys( array_keys( $modules ), 'ready' ) );
                        }
index 4e28e76..87a3c2d 100644 (file)
@@ -41,6 +41,7 @@ class ResourceLoaderContext {
        protected $only;
        protected $version;
        protected $hash;
+       protected $raw;
 
        /* Methods */
 
@@ -64,6 +65,7 @@ class ResourceLoaderContext {
                $this->debug     = $request->getFuzzyBool( 'debug', $wgResourceLoaderDebug );
                $this->only      = $request->getVal( 'only' );
                $this->version   = $request->getVal( 'version' );
+               $this->raw       = $request->getFuzzyBool( 'raw' );
 
                $skinnames = Skin::getSkinNames();
                // If no skin is specified, or we don't recognize the skin, use the default skin
@@ -200,6 +202,13 @@ class ResourceLoaderContext {
                return $this->version;
        }
 
+       /**
+        * @return bool
+        */
+       public function getRaw() {
+               return $this->raw;
+       }
+
        /**
         * @return bool
         */
index e8542ac..f0892ec 100644 (file)
@@ -111,6 +111,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        protected $position = 'bottom';
        /** Boolean: Link to raw files in debug mode */
        protected $debugRaw = true;
+       /** Boolean: Whether mw.loader.state() call should be omitted */
+       protected $raw = false;
        /**
         * Array: Cache for mtime
         * @par Usage:
@@ -240,6 +242,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                                        break;
                                // Single booleans
                                case 'debugRaw':
+                               case 'raw':
                                        $this->{$member} = (bool) $option;
                                        break;
                        }
@@ -367,6 +370,13 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                return $this->dependencies;
        }
 
+       /**
+        * @return bool
+        */
+       public function isRaw() {
+               return $this->raw;
+       }
+
        /**
         * Get the last modified timestamp of this module.
         *
index fa76a25..035ff09 100644 (file)
@@ -246,6 +246,17 @@ abstract class ResourceLoaderModule {
                return 'bottom';
        }
 
+       /**
+        * Whether this module's JS expects to work without the client-side ResourceLoader module.
+        * Returning true from this function will prevent mw.loader.state() call from being
+        * appended to the bottom of the script.
+        *
+        * @return bool
+        */
+       public function isRaw() {
+               return false;
+       }
+
        /**
         * Get the loader JS for this module, if set.
         *
index 74724a6..467a1ac 100644 (file)
@@ -173,6 +173,13 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
 
        /* Methods */
 
+       /**
+        * @return bool
+        */
+       public function isRaw() {
+               return true;
+       }
+
        /**
         * @param $context ResourceLoaderContext
         * @return string
index 2c55980..517270a 100644 (file)
@@ -216,7 +216,8 @@ class RevDel_RevisionItem extends RevDel_Item {
         * @return string
         */
        protected function getRevisionLink() {
-               $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true );
+               $date = $this->list->getLanguage()->userTimeAndDate(
+                       $this->revision->getTimestamp(), $this->list->getUser() );
                if ( $this->isDeleted() && !$this->canViewContent() ) {
                        return $date;
                }
@@ -238,12 +239,12 @@ class RevDel_RevisionItem extends RevDel_Item {
         */
        protected function getDiffLink() {
                if ( $this->isDeleted() && !$this->canViewContent() ) {
-                       return wfMsgHtml('diff');
+                       return $this->list->msg( 'diff' )->escaped();
                } else {
                        return
                                Linker::link(
                                        $this->list->title,
-                                       wfMsgHtml('diff'),
+                                       $this->list->msg( 'diff' )->escaped(),
                                        array(),
                                        array(
                                                'diff' => $this->revision->getId(),
@@ -364,7 +365,8 @@ class RevDel_ArchiveItem extends RevDel_RevisionItem {
 
        protected function getRevisionLink() {
                $undelete = SpecialPage::getTitleFor( 'Undelete' );
-               $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true );
+               $date = $this->list->getLanguage()->userTimeAndDate(
+                       $this->revision->getTimestamp(), $this->list->getUser() );
                if ( $this->isDeleted() && !$this->canViewContent() ) {
                        return $date;
                }
@@ -377,10 +379,10 @@ class RevDel_ArchiveItem extends RevDel_RevisionItem {
 
        protected function getDiffLink() {
                if ( $this->isDeleted() && !$this->canViewContent() ) {
-                       return wfMsgHtml( 'diff' );
+                       return $this->list->msg( 'diff' )->escaped();
                }
                $undelete = SpecialPage::getTitleFor( 'Undelete' );
-               return Linker::link( $undelete, wfMsgHtml('diff'), array(),
+               return Linker::link( $undelete, $this->list->msg( 'diff' )->escaped(), array(),
                        array(
                                'target' => $this->list->title->getPrefixedText(),
                                'diff' => 'prev',
@@ -596,7 +598,8 @@ class RevDel_FileItem extends RevDel_Item {
         * @return string
         */
        protected function getLink() {
-               $date = $this->list->getLanguage()->timeanddate( $this->file->getTimestamp(), true  );
+               $date = $this->list->getLanguage()->userTimeAndDate(
+                       $this->file->getTimestamp(), $this->list->getUser() );
                if ( $this->isDeleted() ) {
                        # Hidden files...
                        if ( !$this->canViewContent() ) {
@@ -629,7 +632,7 @@ class RevDel_FileItem extends RevDel_Item {
                        $link = Linker::userLink( $this->file->user, $this->file->user_text ) .
                                Linker::userToolLinks( $this->file->user, $this->file->user_text );
                } else {
-                       $link = wfMsgHtml( 'rev-deleted-user' );
+                       $link = $this->list->msg( 'rev-deleted-user' )->escaped();
                }
                if( $this->file->isDeleted( Revision::DELETED_USER ) ) {
                        return '<span class="history-deleted">' . $link . '</span>';
@@ -647,7 +650,7 @@ class RevDel_FileItem extends RevDel_Item {
                if( $this->file->userCan( File::DELETED_COMMENT, $this->list->getUser() ) ) {
                        $block = Linker::commentBlock( $this->file->description );
                } else {
-                       $block = ' ' . wfMsgHtml( 'rev-deleted-comment' );
+                       $block = ' ' . $this->list->msg( 'rev-deleted-comment' )->escaped();
                }
                if( $this->file->isDeleted( File::DELETED_COMMENT ) ) {
                        return "<span class=\"history-deleted\">$block</span>";
@@ -657,14 +660,9 @@ class RevDel_FileItem extends RevDel_Item {
 
        public function getHTML() {
                $data =
-                       wfMsg(
-                               'widthheight',
-                               $this->list->getLanguage()->formatNum( $this->file->getWidth() ),
-                               $this->list->getLanguage()->formatNum( $this->file->getHeight() )
-                       ) .
-                       ' (' .
-                       wfMsgExt( 'nbytes', 'parsemag', $this->list->getLanguage()->formatNum( $this->file->getSize() ) ) .
-                       ')';
+                       $this->list->msg( 'widthheight' )->numParams(
+                               $this->file->getWidth(), $this->file->getHeight() )->text() .
+                       ' (' . $this->list->msg( 'nbytes' )->numParams( $this->file->getSize() )->text() . ')';
 
                return '<li>' . $this->getLink() . ' ' . $this->getUserTools() . ' ' .
                        $data . ' ' . $this->getComment(). '</li>';
@@ -747,7 +745,8 @@ class RevDel_ArchivedFileItem extends RevDel_FileItem {
        }
 
        protected function getLink() {
-               $date = $this->list->getLanguage()->timeanddate( $this->file->getTimestamp(), true  );
+               $date = $this->list->getLanguage()->userTimeAndDate(
+                       $this->file->getTimestamp(), $this->list->getUser() );
                $undelete = SpecialPage::getTitleFor( 'Undelete' );
                $key = $this->file->getKey();
                # Hidden files...
@@ -872,15 +871,17 @@ class RevDel_LogItem extends RevDel_Item {
        }
 
        public function getHTML() {
-               $date = htmlspecialchars( $this->list->getLanguage()->timeanddate( $this->row->log_timestamp ) );
+               $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
+                       $this->row->log_timestamp, $this->list->getUser() ) );
                $title = Title::makeTitle( $this->row->log_namespace, $this->row->log_title );
                $formatter = LogFormatter::newFromRow( $this->row );
+               $formatter->setContext( $this->list->getContext() );
                $formatter->setAudience( LogFormatter::FOR_THIS_USER );
 
                // Log link for this page
                $loglink = Linker::link(
                        SpecialPage::getTitleFor( 'Log' ),
-                       wfMsgHtml( 'log' ),
+                       $this->list->msg( 'log' )->escaped(),
                        array(),
                        array( 'page' => $title->getPrefixedText() )
                );
index 8f4a943..06a4694 100644 (file)
@@ -106,7 +106,7 @@ class ActiveUsersPager extends UsersPager {
                                'MAX(ipb_user) AS blocked'
                        ),
                        'options' => array(
-                               'GROUP BY' => 'rc_user_text, user_id',
+                               'GROUP BY' => array( 'rc_user_text', 'user_id' ),
                                'USE INDEX' => array( 'recentchanges' => 'rc_user_text' )
                        ),
                        'join_conds' => array(
index b46ef0e..b7f1e61 100644 (file)
@@ -277,7 +277,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        array( 'wl_namespace',  'wl_title' ),
                        array( 'wl_user' => $this->getUser()->getId() ),
                        __METHOD__,
-                       array( 'ORDER BY' => 'wl_namespace, wl_title' )
+                       array( 'ORDER BY' => array( 'wl_namespace', 'wl_title' ) )
                );
 
                $lb = new LinkBatch();
index 7677095..5610cc2 100644 (file)
@@ -56,7 +56,7 @@ class FewestrevisionsPage extends QueryPage {
                        // useful to remove this. People _do_ create pages
                        // and never revise them, they aren't necessarily
                        // redirects.
-                       'GROUP BY' => 'page_namespace, page_title, page_is_redirect' )
+                       'GROUP BY' => array( 'page_namespace', 'page_title', 'page_is_redirect' ) )
                );
        }
 
index fd48cb0..abd83ac 100644 (file)
@@ -156,9 +156,8 @@ class ImageListPager extends TablePager {
                        if( $dbr->implicitGroupby() ) {
                                $options = array( 'GROUP BY' => 'img_name' );
                        } else {
-                               $columnlist = implode( ',',
-                                       preg_grep( '/^img/', array_keys( $this->getFieldNames() ) ) );
-                               $options = array( 'GROUP BY' => "img_user, $columnlist" );
+                               $columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) );
+                               $options = array( 'GROUP BY' => array_merge( array( 'img_user' ), $columnlist ) );
                        }
                        $join_conds = array( 'oldimage' => array( 'LEFT JOIN', 'oi_name = img_name' ) );
                }
index 98b7367..6de4840 100644 (file)
@@ -46,12 +46,32 @@ class MostcategoriesPage extends QueryPage {
                                        'COUNT(*) AS value' ),
                        'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces() ),
                        'options' => array ( 'HAVING' => 'COUNT(*) > 1',
-                               'GROUP BY' => 'page_namespace, page_title' ),
+                               'GROUP BY' => array( 'page_namespace', 'page_title' ) ),
                        'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
                                        'page_id = cl_from' ) )
                );
        }
 
+       /**
+        * @param $db DatabaseBase
+        * @param $res
+        */
+       function preprocessResults( $db, $res ) {
+               # There's no point doing a batch check if we aren't caching results;
+               # the page must exist for it to have been pulled out of the table
+               if ( !$this->isCached() || !$res->numRows() ) {
+                       return;
+               }
+
+               $batch = new LinkBatch();
+               foreach ( $res as $row ) {
+                       $batch->add( $row->namespace, $row->title );
+               }
+               $batch->execute();
+
+               $res->seek( 0 );
+       }
+
        /**
         * @param $skin Skin
         * @param $result
@@ -59,9 +79,19 @@ class MostcategoriesPage extends QueryPage {
         */
        function formatResult( $skin, $result ) {
                $title = Title::makeTitleSafe( $result->namespace, $result->title );
+               if ( !$title ) {
+                       return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
+                               Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) );
+               }
+
+               if ( $this->isCached() ) {
+                       $link = Linker::link( $title );
+               } else {
+                       $link = Linker::linkKnown( $title );
+               }
 
                $count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped();
-               $link = Linker::link( $title );
+
                return $this->getLanguage()->specialList( $link, $count );
        }
 }
index a16f087..47e8fbf 100644 (file)
@@ -47,8 +47,8 @@ class MostlinkedPage extends QueryPage {
                                        'COUNT(*) AS value',
                                        'page_namespace' ),
                        'options' => array ( 'HAVING' => 'COUNT(*) > 1',
-                               'GROUP BY' => 'pl_namespace, pl_title, '.
-                                               'page_namespace' ),
+                               'GROUP BY' => array( 'pl_namespace', 'pl_title',
+                                               'page_namespace' ) ),
                        'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
                                        array ( 'page_namespace = pl_namespace',
                                                'page_title = pl_title' ) ) )
index 72dc15b..370ba68 100644 (file)
@@ -68,7 +68,7 @@ class MostlinkedTemplatesPage extends QueryPage {
                                        'tl_title AS title',
                                        'COUNT(*) AS value' ),
                        'conds' => array ( 'tl_namespace' => NS_TEMPLATE ),
-                       'options' => array( 'GROUP BY' => 'tl_namespace, tl_title' )
+                       'options' => array( 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) )
                );
        }
 
index d1bb3f0..654d5b7 100644 (file)
@@ -97,8 +97,8 @@ class PageArchive {
                                $condition,
                                __METHOD__,
                                array(
-                                       'GROUP BY' => 'ar_namespace,ar_title',
-                                       'ORDER BY' => 'ar_namespace,ar_title',
+                                       'GROUP BY' => array( 'ar_namespace', 'ar_title' ),
+                                       'ORDER BY' => array( 'ar_namespace', 'ar_title' ),
                                        'LIMIT' => 100,
                                )
                        )
index 4624b35..9f5d52d 100644 (file)
@@ -72,7 +72,7 @@ class WantedPagesPage extends WantedQueryPage {
                        ),
                        'options' => array(
                                'HAVING' => "COUNT(*) > $count",
-                               'GROUP BY' => 'pl_namespace, pl_title'
+                               'GROUP BY' => array( 'pl_namespace', 'pl_title' )
                        ),
                        'join_conds' => array(
                                'pg1' => array(
index ab9d604..2b4364b 100644 (file)
@@ -46,7 +46,7 @@ class WantedTemplatesPage extends WantedQueryPage {
                        'conds' => array ( 'page_title IS NULL',
                                        'tl_namespace' => NS_TEMPLATE ),
                        'options' => array (
-                               'GROUP BY' => 'tl_namespace, tl_title' ),
+                               'GROUP BY' => array( 'tl_namespace', 'tl_title' ) ),
                        'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
                                        array ( 'page_namespace = tl_namespace',
                                                'page_title = tl_title' ) ) )
index 83ffed9..a4de98a 100644 (file)
@@ -211,14 +211,17 @@ abstract class UploadBase {
         * @return stringthe real path if it was a virtual URL
         */
        function getRealPath( $srcPath ) {
+               wfProfileIn( __METHOD__ );
                $repo = RepoGroup::singleton()->getLocalRepo();
                if ( $repo->isVirtualUrl( $srcPath ) ) {
                        // @TODO: just make uploads work with storage paths
                        // UploadFromStash loads files via virtuals URLs
                        $tmpFile = $repo->getLocalCopy( $srcPath );
                        $tmpFile->bind( $this ); // keep alive with $thumb
+                       wfProfileOut( __METHOD__ );
                        return $tmpFile->getPath();
                }
+               wfProfileOut( __METHOD__ );
                return $srcPath;
        }
 
@@ -227,10 +230,13 @@ abstract class UploadBase {
         * @return mixed self::OK or else an array with error information
         */
        public function verifyUpload() {
+               wfProfileIn( __METHOD__ );
+
                /**
                 * If there was no filename or a zero size given, give up quick.
                 */
                if( $this->isEmptyFile() ) {
+                       wfProfileOut( __METHOD__ );
                        return array( 'status' => self::EMPTY_FILE );
                }
 
@@ -239,6 +245,7 @@ abstract class UploadBase {
                 */
                $maxSize = self::getMaxUploadSize( $this->getSourceType() );
                if( $this->mFileSize > $maxSize ) {
+                       wfProfileOut( __METHOD__ );
                        return array(
                                'status' => self::FILE_TOO_LARGE,
                                'max' => $maxSize,
@@ -252,6 +259,7 @@ abstract class UploadBase {
                 */
                $verification = $this->verifyFile();
                if( $verification !== true ) {
+                       wfProfileOut( __METHOD__ );
                        return array(
                                'status' => self::VERIFICATION_ERROR,
                                'details' => $verification
@@ -263,15 +271,19 @@ abstract class UploadBase {
                 */
                $result = $this->validateName();
                if( $result !== true ) {
+                       wfProfileOut( __METHOD__ );
                        return $result;
                }
 
                $error = '';
                if( !wfRunHooks( 'UploadVerification',
-                               array( $this->mDestName, $this->mTempPath, &$error ) ) ) {
+                       array( $this->mDestName, $this->mTempPath, &$error ) ) )
+               {
+                       wfProfileOut( __METHOD__ );
                        return array( 'status' => self::HOOK_ABORTED, 'error' => $error );
                }
 
+               wfProfileOut( __METHOD__ );
                return array( 'status' => self::OK );
        }
 
@@ -309,15 +321,18 @@ abstract class UploadBase {
         */
        protected function verifyMimeType( $mime ) {
                global $wgVerifyMimeType;
+               wfProfileIn( __METHOD__ );
                if ( $wgVerifyMimeType ) {
                        wfDebug ( "\n\nmime: <$mime> extension: <{$this->mFinalExtension}>\n\n");
                        global $wgMimeTypeBlacklist;
                        if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
+                               wfProfileOut( __METHOD__ );
                                return array( 'filetype-badmime', $mime );
                        }
 
                        # XXX: Missing extension will be caught by validateName() via getTitle()
                        if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
+                               wfProfileOut( __METHOD__ );
                                return array( 'filetype-mime-mismatch', $this->mFinalExtension, $mime );
                        }
 
@@ -331,11 +346,13 @@ abstract class UploadBase {
                        $ieTypes = $magic->getIEMimeTypes( $this->mTempPath, $chunk, $extMime );
                        foreach ( $ieTypes as $ieType ) {
                                if ( $this->checkFileExtension( $ieType, $wgMimeTypeBlacklist ) ) {
+                                       wfProfileOut( __METHOD__ );
                                        return array( 'filetype-bad-ie-mime', $ieType );
                                }
                        }
                }
 
+               wfProfileOut( __METHOD__ );
                return true;
        }
 
@@ -346,6 +363,8 @@ abstract class UploadBase {
         */
        protected function verifyFile() {
                global $wgAllowJavaUploads, $wgDisableUploadScriptChecks;
+               wfProfileIn( __METHOD__ );
+
                # get the title, even though we are doing nothing with it, because
                # we need to populate mFinalExtension
                $this->getTitle();
@@ -356,16 +375,19 @@ abstract class UploadBase {
                $mime = $this->mFileProps[ 'file-mime' ];
                $status = $this->verifyMimeType( $mime );
                if ( $status !== true ) {
+                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
                # check for htmlish code and javascript
                if ( !$wgDisableUploadScriptChecks ) {
                        if( self::detectScript( $this->mTempPath, $mime, $this->mFinalExtension ) ) {
+                               wfProfileOut( __METHOD__ );
                                return array( 'uploadscripted' );
                        }
                        if( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
                                if( $this->detectScriptInSvg( $this->mTempPath ) ) {
+                                       wfProfileOut( __METHOD__ );
                                        return array( 'uploadscripted' );
                                }
                        }
@@ -381,10 +403,12 @@ abstract class UploadBase {
                                $errors = $zipStatus->getErrorsArray();
                                $error = reset( $errors );
                                if ( $error[0] !== 'zip-wrong-format' ) {
+                                       wfProfileOut( __METHOD__ );
                                        return $error;
                                }
                        }
                        if ( $this->mJavaDetected ) {
+                               wfProfileOut( __METHOD__ );
                                return array( 'uploadjava' );
                        }
                }
@@ -392,6 +416,7 @@ abstract class UploadBase {
                # Scan the uploaded file for viruses
                $virus = $this->detectVirus( $this->mTempPath );
                if ( $virus ) {
+                       wfProfileOut( __METHOD__ );
                        return array( 'uploadvirus', $virus );
                }
 
@@ -400,16 +425,19 @@ abstract class UploadBase {
                        $handlerStatus = $handler->verifyUpload( $this->mTempPath );
                        if ( !$handlerStatus->isOK() ) {
                                $errors = $handlerStatus->getErrorsArray();
+                               wfProfileOut( __METHOD__ );
                                return reset( $errors );
                        }
                }
 
                wfRunHooks( 'UploadVerifyFile', array( $this, $mime, &$status ) );
                if ( $status !== true ) {
+                       wfProfileOut( __METHOD__ );
                        return $status;
                }
 
                wfDebug( __METHOD__ . ": all clear; passing.\n" );
+               wfProfileOut( __METHOD__ );
                return true;
        }
 
@@ -495,6 +523,7 @@ abstract class UploadBase {
         */
        public function checkWarnings() {
                global $wgLang;
+               wfProfileIn( __METHOD__ );
 
                $warnings = array();
 
@@ -555,6 +584,7 @@ abstract class UploadBase {
                        $warnings['duplicate-archive'] = $archivedImage->getName();
                }
 
+               wfProfileOut( __METHOD__ );
                return $warnings;
        }
 
@@ -567,6 +597,8 @@ abstract class UploadBase {
         * @return Status indicating the whether the upload succeeded.
         */
        public function performUpload( $comment, $pageText, $watch, $user ) {
+               wfProfileIn( __METHOD__ );
+
                $status = $this->getLocalFile()->upload(
                        $this->mTempPath,
                        $comment,
@@ -581,10 +613,10 @@ abstract class UploadBase {
                        if ( $watch ) {
                                $user->addWatch( $this->getLocalFile()->getTitle() );
                        }
-
                        wfRunHooks( 'UploadComplete', array( &$this ) );
                }
 
+               wfProfileOut( __METHOD__ );
                return $status;
        }
 
@@ -727,9 +759,13 @@ abstract class UploadBase {
         */
        public function stashFile() {
                // was stashSessionFile
+               wfProfileIn( __METHOD__ );
+
                $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash();
                $file = $stash->stashFile( $this->mTempPath, $this->getSourceType() );
                $this->mLocalFile = $file;
+
+               wfProfileOut( __METHOD__ );
                return $file;
        }
 
@@ -855,6 +891,7 @@ abstract class UploadBase {
         */
        public static function detectScript( $file, $mime, $extension ) {
                global $wgAllowTitlesInSVG;
+               wfProfileIn( __METHOD__ );
 
                # ugly hack: for text files, always look at the entire file.
                # For binary field, just check the first K.
@@ -870,6 +907,7 @@ abstract class UploadBase {
                $chunk = strtolower( $chunk );
 
                if( !$chunk ) {
+                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -893,6 +931,7 @@ abstract class UploadBase {
 
                # check for HTML doctype
                if ( preg_match( "/<!DOCTYPE *X?HTML/i", $chunk ) ) {
+                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
@@ -929,6 +968,7 @@ abstract class UploadBase {
                foreach( $tags as $tag ) {
                        if( false !== strpos( $chunk, $tag ) ) {
                                wfDebug( __METHOD__ . ": found something that may make it be mistaken for html: $tag\n" );
+                               wfProfileOut( __METHOD__ );
                                return true;
                        }
                }
@@ -943,22 +983,26 @@ abstract class UploadBase {
                # look for script-types
                if( preg_match( '!type\s*=\s*[\'"]?\s*(?:\w*/)?(?:ecma|java)!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found script types\n" );
+                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
                # look for html-style script-urls
                if( preg_match( '!(?:href|src|data)\s*=\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found html-style script urls\n" );
+                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
                # look for css-style script-urls
                if( preg_match( '!url\s*\(\s*[\'"]?\s*(?:ecma|java)script:!sim', $chunk ) ) {
                        wfDebug( __METHOD__ . ": found css-style script urls\n" );
+                       wfProfileOut( __METHOD__ );
                        return true;
                }
 
                wfDebug( __METHOD__ . ": no scripts found\n" );
+               wfProfileOut( __METHOD__ );
                return false;
        }
 
@@ -1040,7 +1084,7 @@ abstract class UploadBase {
                        }
 
 
-                       # use handler attribute with remote / data / script 
+                       # use handler attribute with remote / data / script
                        if( $stripped == 'handler' &&  preg_match( '!(http|https|data|script):!sim', $value ) ) {
                                wfDebug( __METHOD__ . ": Found svg setting handler with remote/data/script '$attrib'='$value' in uploaded file.\n" );
                                return true;
@@ -1086,9 +1130,11 @@ abstract class UploadBase {
         */
        public static function detectVirus( $file ) {
                global $wgAntivirus, $wgAntivirusSetup, $wgAntivirusRequired, $wgOut;
+               wfProfileIn( __METHOD__ );
 
                if ( !$wgAntivirus ) {
                        wfDebug( __METHOD__ . ": virus scanner disabled\n" );
+                       wfProfileOut( __METHOD__ );
                        return null;
                }
 
@@ -1096,6 +1142,7 @@ abstract class UploadBase {
                        wfDebug( __METHOD__ . ": unknown virus scanner: $wgAntivirus\n" );
                        $wgOut->wrapWikiMsg( "<div class=\"error\">\n$1\n</div>",
                                array( 'virus-badscanner', $wgAntivirus ) );
+                       wfProfileOut( __METHOD__ );
                        return wfMsg( 'virus-unknownscanner' ) . " $wgAntivirus";
                }
 
@@ -1138,17 +1185,21 @@ abstract class UploadBase {
                        wfDebug( __METHOD__ . ": failed to scan $file (code $exitCode).\n" );
 
                        if ( $wgAntivirusRequired ) {
+                               wfProfileOut( __METHOD__ );
                                return wfMsg( 'virus-scanfailed', array( $exitCode ) );
                        } else {
+                               wfProfileOut( __METHOD__ );
                                return null;
                        }
                } elseif ( $mappedCode === AV_SCAN_ABORTED ) {
                        # scan failed because filetype is unknown (probably imune)
                        wfDebug( __METHOD__ . ": unsupported file type $file (code $exitCode).\n" );
+                       wfProfileOut( __METHOD__ );
                        return null;
                } elseif ( $mappedCode === AV_NO_VIRUS ) {
                        # no virus found
                        wfDebug( __METHOD__ . ": file passed virus scan.\n" );
+                       wfProfileOut( __METHOD__ );
                        return false;
                } else {
                        $output = trim( $output );
@@ -1165,6 +1216,7 @@ abstract class UploadBase {
                        }
 
                        wfDebug( __METHOD__ . ": FOUND VIRUS! scanner feedback: $output \n" );
+                       wfProfileOut( __METHOD__ );
                        return $output;
                }
        }
diff --git a/includes/zhtable/.gitignore b/includes/zhtable/.gitignore
new file mode 100644 (file)
index 0000000..c4cf2eb
--- /dev/null
@@ -0,0 +1,3 @@
+*.zip
+*.tar.gz
+*.tgz
old mode 100644 (file)
new mode 100755 (executable)
index 305422b..2bb53ab
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # @author Philip
 import tarfile as tf
@@ -39,7 +39,7 @@ LIBTABE_VER = '0.2.3'
 
 def download( url, dest ):
     if os.path.isfile( dest ):
-        print( 'File %s up to date.' % dest )
+        print( 'File %s is up to date.' % dest )
         return
     global islinux
     if islinux:
@@ -372,13 +372,13 @@ $zh2Hant = array(\n'''
         +  PHPArray( toSG ) \
         +  '\n);'
     
-    f = open( 'ZhConversion.php', 'wb', encoding = 'utf8' )
+    f = open( os.path.join( '..', 'ZhConversion.php' ), 'wb', encoding = 'utf8' )
     print ('Writing ZhConversion.php ... ')
     f.write( php )
     f.close()
     
-    #Remove temp files
-    print ('Deleting temp files ... ')
+    # Remove temporary files
+    print ('Deleting temporary files ... ')
     os.remove('EZ-Big.txt.in')
     os.remove('phrase_lib.txt')
     os.remove('tsi.src')
index a3140b2..35629b9 100644 (file)
@@ -44,7 +44,7 @@
        'bm' => 'Bamanankan',   # Bambara
        'bn' => 'বাংলা',      # Bengali
        'bo' => 'བོད་ཡིག',        # Tibetan
-       'bpy' => 'à¦\87মার à¦ à¦¾à¦°/বিষà§\8dণà§\81পà§\8dরিয়া à¦®à¦£à¦¿à¦ªà§\81রà§\80',        # Bishnupriya Manipuri
+       'bpy' => 'বিষà§\8dণà§\81পà§\8dরিয়া à¦®à¦£à¦¿à¦ªà§\81রà§\80',       # Bishnupriya Manipuri
        'bqi' => 'بختياري',      # Bakthiari
        'br' => 'Brezhoneg',    # Breton
        'brh' => 'Bráhuí',    # Brahui
index 9474765..c957228 100644 (file)
@@ -42,6 +42,7 @@
  * @author Ouda
  * @author Oxydo
  * @author Rami.Awad
+ * @author Reedy
  * @author Riadismet
  * @author Samer
  * @author Sami Lab
@@ -2924,7 +2925,7 @@ $1',
 
 وفي هذه الحالات، يجب عليك نقل أو دمج محتويات الصفحة يدويا، إذا رغب في ذلك.",
 'movearticle' => 'انقل الصفحة:',
-'moveuserpage-warning' => "'''تحذير: أنت على وشك نقل صفحة مستخدم. من فضلك لاحظ أن الصفحة وحدها سوف تنقل وأن المستخدم <u>لن</u> يعاد تسميته.'''",
+'moveuserpage-warning' => "'''تحذير: أنت على وشك نقل صفحة مستخدم. من فضلك لاحظ أن الصفحة وحدها سوف تنقل وأن المستخدم لن يعاد تسميته.'''",
 'movenologin' => 'غير مسجل',
 'movenologintext' => 'يجب أن تكون مستخدما مسجلا وأن تقوم [[Special:UserLogin|بالدخول]] لكي تنقل صفحة.',
 'movenotallowed' => 'أنت لا تمتلك الصلاحية لنقل الصفحات.',
index 840ac65..998632a 100644 (file)
@@ -1045,6 +1045,8 @@ Asegúrate de qu'esti cambéu caltenga la continuidá del históricu de la páxi
 
 # Diffs
 'history-title' => 'Historial de revisiones de "$1"',
+'difference-title' => 'Diferencia ente revisiones de «$1»',
+'difference-title-multipage' => 'Diferencia ente les páxines «$1» y «$2»',
 'difference-multipage' => '(Diferencia ente páxines)',
 'lineno' => 'Llinia $1:',
 'compareselectedversions' => 'Comparar les revisiones seleicionaes',
index 4b99826..33fb6c7 100644 (file)
@@ -3649,14 +3649,14 @@ MediaWiki файҙалы булыр, тигән өмөттә, ләкин БЕР
 'api-error-verification-error' => 'Был файл боҙолған, йәки дөрөҫ булмаған ҡушымтаһы бар.',
 
 # Durations
-'duration-seconds' => 'секунд',
+'duration-seconds' => '$1 {{PLURAL:$1|секунд|секунд}}',
 'duration-minutes' => 'минут',
 'duration-hours' => 'сәғәт',
 'duration-days' => 'көн',
-'duration-weeks' => 'аҙна',
-'duration-years' => 'йыл',
-'duration-decades' => 'декада',
-'duration-centuries' => 'быуат',
-'duration-millennia' => 'меңйыллыҡ',
+'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|меңйыллыҡ|меңйыллыҡтар}}',
 
 );
index f760a9a..3d39e98 100644 (file)
@@ -100,15 +100,15 @@ $messages = array(
 'tog-hideminor' => 'Tagóon an mga saradít na paghirá sa nakakaági pa sanáng pagbabàgo',
 'tog-hidepatrolled' => 'Tagóon an mga saradít na paghirá sa nakakaági pa sanáng pagbabàgo',
 'tog-newpageshidepatrolled' => 'Tagóon an mga pigbabantayán na pahina sa lista nin mga bàgong pahina',
-'tog-extendwatchlist' => 'Palakbangón an lista kan pigbabantayan tangarig mahiling an gabos na angay na pagbabàgo',
-'tog-usenewrc' => 'Paorogón an kaaging pagbabàgo (JavaScript)',
+'tog-extendwatchlist' => 'Palakbangón an taytáy kan babantayan tanganing mahilíng an gabós na angay na pagbàgo',
+'tog-usenewrc' => 'Gamiton an pinauróg na mga nakaaging pagbàgo (kaipohan nin JavaScript)',
 'tog-numberheadings' => 'Tolos na pagbílang sa mga pamayohán',
 'tog-showtoolbar' => 'Ipahilíng an toolbar nin paghirá (JavaScript)',
 'tog-editondblclick' => 'Hirahón sa dobleng paglagatík an mga pahina (JavaScript)',
 'tog-editsection' => 'Togótan an paghirá kan seksyon sa paági kan mga takód na [hirá]',
 'tog-editsectiononrightclick' => 'Togotan an paghirá kan seksyon sa pag-lagatik sa walá sa mga titulo nin seksyon (JavaScript)',
 'tog-showtoc' => 'Ipahilíng an indise kan mga laog (para sa mga pahinang igwang sobra sa 3 pamayohan)',
-'tog-rememberpassword' => 'Giromdomón an mga paglaóg ko sa kompyuter na iní (for a maximum of $1 {{PLURAL:$1|day|days}})',
+'tog-rememberpassword' => 'Giromdomón an mga paglaóg ko sa panlibotlibot na iní (sa nakaaging $1 {{PLURAL:$1|aldaw|mga aldaw}})',
 'tog-watchcreations' => 'Idúgang an mga pahinang ginigíbo ko sa pigbabantayan ko',
 'tog-watchdefault' => 'Idúgang an mga pahinang pighíhirá ko sa pigbabantayan ko',
 'tog-watchmoves' => 'Idúgang an mga pahinang piglilípat ko sa pigbabantayan ko',
@@ -116,7 +116,7 @@ $messages = array(
 'tog-minordefault' => 'Markahán an gabos na paghirá nin sadit na paghirá',
 'tog-previewontop' => 'Ipahilíng an patànaw bàgo an kahon nin paghirá',
 'tog-previewonfirst' => 'Ipahilíng an patànaw sa enot na paghirá',
-'tog-nocache' => 'Pogólon an pag-abang nin mga pahina',
+'tog-nocache' => 'Pugolon an pag-abáng nin mga pahina',
 'tog-enotifwatchlistpages' => 'E-koreohan ako pag pigribayan an pahinang pigbabantayan ko',
 'tog-enotifusertalkpages' => 'E-koreohan ako pag pigribáyan an pahina kan sakóng olay',
 'tog-enotifminoredits' => 'E-koreohan man giraray ako para sa saradit na paghirá kan mga pahina',
@@ -237,6 +237,7 @@ $messages = array(
 'vector-view-view' => 'Basáhon',
 'vector-view-viewsource' => 'Hilingón an ginikánan',
 'actions' => 'Mga paghiro',
+'namespaces' => 'Liang-liang',
 
 'errorpagetitle' => 'Salâ',
 'returnto' => 'Magbwelta sa $1.',
@@ -346,7 +347,7 @@ $messages = array(
 'page-rss-feed' => '"$1" Hungit na RSS',
 'page-atom-feed' => '"$1" Hungit na Atomo',
 'feed-atom' => 'Atomo',
-'red-link-title' => '$1 (dai pa naisusurat)',
+'red-link-title' => '$1 (daí pa naisusurat)',
 
 # Short words for each namespace, by default used in the namespace tab in monobook
 'nstab-main' => 'Pahina',
@@ -756,6 +757,8 @@ An ibang mga administrador sa ining wiki pwede pang maghiling kan mga nakatagong
 'nextn' => 'sunód na {{PLURAL:$1|$1}}',
 'viewprevnext' => 'Hilingón ($1 {{int:pipe-separator}} $2) ($3)',
 'searchhelp-url' => 'Help:Mga laog',
+'searchprofile-everything' => 'Gabós',
+'searchprofile-articles-tooltip' => 'Hanapon sa $1',
 'search-result-size' => '$1 ({{PLURAL:$2|1 tatarámon|$2 mga tatarámon}})',
 'search-suggest' => 'Boót mo iyó: $1',
 'search-interwiki-more' => '(dakol pa)',
@@ -1111,7 +1114,7 @@ An páhina pigkokonsiderar na páhina nin klaripikasyon kun naggagamit ini nin t
 'mostcategories' => 'Mga artikulong may pinaka dakol na kategorya',
 'mostimages' => 'Pinakapigtatakodan na files',
 'mostrevisions' => 'Mga artikulong may pinakadakol na pagpakarháy',
-'prefixindex' => 'Murô nin prefiho',
+'prefixindex' => 'Gabós na pahinang igwáng katakód',
 'shortpages' => 'Haralìpot na pahina',
 'longpages' => 'Mga halabang pahina',
 'deadendpages' => 'Mga pahinang mayong luwasan',
@@ -1431,7 +1434,7 @@ $1",
 
 # What links here
 'whatlinkshere' => 'An nakatakód digdí',
-'whatlinkshere-title' => 'Mga pahinang nakatakod sa $1',
+'whatlinkshere-title' => 'Mga pahinang nakatakód sa $1',
 'whatlinkshere-page' => 'Pahina:',
 'linkshere' => "An mga minasunod na pahina nakatakod sa '''[[:$1]]''':",
 'nolinkshere' => "Mayong pahinang nakatakod sa '''[[:$1]]'''.",
@@ -1495,6 +1498,7 @@ Magkaag nin espisipikong rason (halimbawa, magtao nin ehemplo kan mga páhinang
 'ipblocklist-no-results' => 'Dai nabagat an hinagad na direccion nin IP o ngaran nin paragamit.',
 'blocklink' => 'bagáton',
 'unblocklink' => 'paagihon',
+'change-blocklink' => 'sanglián an pagbagat',
 'contribslink' => 'mga ambág',
 'autoblocker' => 'Enseguidang binagat an saimong direccion nin IP ta kaaaging ginamit ini ni "[[User:$1|$1]]". An rason nin pagbagat ni $1: "$2"',
 'blocklogpage' => 'Usip nin pagbagat',
@@ -1642,13 +1646,13 @@ Please visit [//www.mediawiki.org/wiki/Localisation MediaWiki Localisation] and
 'tooltip-pt-anontalk' => 'Mga olay manonongod sa mga hira halî sa ip na ini',
 'tooltip-pt-preferences' => 'Mga kabòtan ko',
 'tooltip-pt-watchlist' => 'Lista nin mga pahina na pigbabantayan an mga pagbabàgo',
-'tooltip-pt-mycontris' => 'Lista kan mga kabòtan ko',
+'tooltip-pt-mycontris' => 'Taytáy kan mga kabòtan ko',
 'tooltip-pt-login' => 'Pigaagda kang maglaog, alagad, bako man ining piriritan.',
 'tooltip-pt-anonlogin' => 'Pig-aagda kang maglaog, alagad, bakô man ining piriritan.',
 'tooltip-pt-logout' => 'Magluwas',
 'tooltip-ca-talk' => 'Olay sa pahina nin laog',
 'tooltip-ca-edit' => 'Pwede mong hirahón ining pahina. Gamiton tabi an patànaw na butones bago an pagtagama.',
-'tooltip-ca-addsection' => 'Magdugang nin komento sa orólay na ini.',
+'tooltip-ca-addsection' => 'Magdugang nin komento sa urulay na iní.',
 'tooltip-ca-viewsource' => 'Sinagangán ining pahina. Mahihilíng mo an ginikanan.',
 'tooltip-ca-history' => 'Mga nakaaging bersyon kaining pahina',
 'tooltip-ca-protect' => 'Protektahán ining pahina',
@@ -1757,7 +1761,7 @@ $1",
 'filedelete-archive-read-only' => 'An direktoryong archibo na "$1" dai nasusuratan kan webserver.',
 
 # Browsing diffs
-'previousdiff' => '← Nakaáging kaibhán',
+'previousdiff' => '← Nakaaging kaibhán',
 'nextdiff' => 'Kaibhán pa→',
 
 # Media information
@@ -1781,11 +1785,11 @@ $1",
 'sp-newimages-showfrom' => 'Hilingón an mga retratong nagpopoon sa $1',
 
 # Bad image list
-'bad_image_list' => 'An pormato iyo an minasunod:
+'bad_image_list' => 'An husay iyó an minasunód:
 
-An mga nakalista sana (mga linyang nagpopoon sa *) an pigkokonsiderar.
-An enot na takod sa linya seguradong sarong takod sa sarong salang file.
-Ano man na takod sa parehong linyang ini pigkokonsiderar na eksepsyon, i.e. mga pahina na may file sa laog nin linya.',
+An mga nakataytáy saná (mga taytáy na nagpopoón sa *) iyó an kaayon.
+An inot na takód sa taytáy kaipohan na saróng takód sa saróng saláng file.
+Anó man na minasunód na takód sa ginikanan na taytáy iyó an kaayon sa mga paglain, i.e. mga pahina na may file na maluwás sa laog kan taytáy.',
 
 # Metadata
 'metadata' => 'Metadatos',
index bbb96a0..7b4661d 100644 (file)
@@ -1206,6 +1206,8 @@ $1",
 
 # Diffs
 'history-title' => 'Гісторыя зьменаў старонкі «$1»',
+'difference-title' => 'Розьніца паміж вэрсіямі «$1»',
+'difference-title-multipage' => 'Розьніца паміж старонкамі «$1» і «$2»',
 'difference-multipage' => '(Розьніца паміж старонкамі)',
 'lineno' => 'Радок $1:',
 'compareselectedversions' => 'Параўнаць выбраныя вэрсіі',
index f1c7561..0e45667 100644 (file)
@@ -3601,10 +3601,10 @@ MediaWiki се разпространява с надеждата, че ще б
 'revdelete-uname-hid' => 'скрито потребителско име',
 'revdelete-restricted' => 'добавени ограничения за администраторите',
 'revdelete-unrestricted' => 'премахнати ограничения за администраторите',
-'logentry-move-move' => '$1 премести страницата $3 към заглавие $4',
-'logentry-move-move-noredirect' => '$1 премести страницата $3 към заглавие $4 без да оставя пренасочване',
+'logentry-move-move' => '$1 премести „$3“ като „$4“',
+'logentry-move-move-noredirect' => '$1 премести „$3“ като „$4“ без пренасочване',
 'logentry-move-move_redir' => '$1 премести страницата $3 като $4 (върху пренасочване)',
-'logentry-move-move_redir-noredirect' => '$1 премести върху пренасочване страницата $3 към заглавие $4 (без пренасочване)',
+'logentry-move-move_redir-noredirect' => '$1 премести върху пренасочване „$3“ като „$4“ без пренасочване',
 'logentry-patrol-patrol' => '$1 отбеляза като патрулирана версия $4 на страницата „$3“',
 'logentry-patrol-patrol-auto' => '$1 автоматично отбеляза като патрулирана версия $4 на страницата $3',
 'logentry-newusers-newusers' => '$1 създаде потребителска сметка',
index ace7aa9..bdf5dc9 100644 (file)
@@ -3141,14 +3141,14 @@ $4-এ নিশ্চিতকরণ কোডটি মেয়াদোত
 'intentionallyblankpage' => 'এই পাতাটি ইচ্ছা করে খালি রাখা হয়েছে',
 
 # External image whitelist
-'external_image_whitelist' => '  #এই লাইন ঠিক যেমন আছে<প্রাক> তেমন রাখুন
+'external_image_whitelist' => '  #এই লাইন ঠিক যেমন আছে<প্রাক> তেমন রাখুন<pre>
  #রেগুলার এক্সপ্রেশনের টুকরা নীচে (শুধুমাত্র অংশ / / মধ্যে যে যায়) বসান
 #এইগুলি এক্সটার্নাল (hotlinked) ইমেজের URL-এর সাথে মেলানো হবে
 #যেগুলি মিলবে, সেগুলি চিত্র হিসাবে প্রদর্শিত হবে, অন্যথায় শুধুমাত্র ইমেজ লিঙ্ক প্রদর্শিত হবে
 #যে লাইনের প্রারম্ভে # আছে সেই লাইনগুলি মন্তব্যসমূহ হিসাবে ব্যবহার করা হয়
 #এটি কেস-অসংবেদী
 
-#এই রেখার উপরের regex টুকরা বসান. এই লাইন ঠিক যেমন আছে তেমন রাখুন</ প্রাক>',
+#এই রেখার উপরের regex টুকরা বসান. এই লাইন ঠিক যেমন আছে তেমন রাখুন</pre>',
 
 # Special:Tags
 'tag-filter' => '[[Special:Tags|ট্যাগ]] ছাকনী:',
index bfbb137..ede25f7 100644 (file)
@@ -572,6 +572,8 @@ $2",
 Els seus motius han estat: «''$2''».",
 'filereadonlyerror' => 'No s\'ha pogut modificar el fitxer «$1» perquè el repositori de fitxers "$2" està en mode només de lectura.
 L\'administrador que l\'ha bloquejat ha donat aquesta explicació: "$3".',
+'invalidtitle-knownnamespace' => "El títol amb l'espai de noms «$2» i text «$3» no és vàlid",
+'invalidtitle-unknownnamespace' => "El títol amb l'espai de noms desconegut de número «$1» i text «$3» no és vàlid",
 
 # Virus scanner
 'virus-badscanner' => "Mala configuració: antivirus desconegut: ''$1''",
@@ -1123,6 +1125,8 @@ Assegureu-vos que aquest canvi mantindrà la continuïtat històrica de la pàgi
 
 # Diffs
 'history-title' => 'Historial de versions de «$1»',
+'difference-title' => 'Diferència entre les revisions de «$1»',
+'difference-title-multipage' => 'Diferència entre les pàgines «$1» i «$2»',
 'difference-multipage' => '(Diferència entre pàgines)',
 'lineno' => 'Línia $1:',
 'compareselectedversions' => 'Compara les versions seleccionades',
@@ -1733,6 +1737,7 @@ Per seguretat, img_auth.php està desactivat.",
 'http-curl-error' => "Error en recuperar l'URL: $1",
 'http-host-unreachable' => "No s'ha pogut accedir a l'URL.",
 'http-bad-status' => 'Hi ha hagut un problema durant la petició HTTP: $1 $2',
+'http-truncated-body' => "El cos de la sol·licitud només s'ha rebut parcialment.",
 
 # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
 'upload-curl-error6' => "No s'ha pogut accedir a l'URL",
index af5b5aa..ca09612 100644 (file)
@@ -1300,6 +1300,8 @@ Ujistěte se, že tato změna udrží souvislost a posloupnost verzí v historii
 
 # Diffs
 'history-title' => 'Historie verzí stránky „$1“',
+'difference-title' => 'Porovnání verzí stránky „$1“',
+'difference-title-multipage' => 'Porovnání stránek „$1“ a „$2“',
 'difference-multipage' => '(Rozdíly mezi stránkami)',
 'lineno' => 'Řádka $1:',
 'compareselectedversions' => 'Porovnat vybrané verze',
index 0a0259c..4390984 100644 (file)
@@ -44,6 +44,7 @@
  * @author Purodha
  * @author Raimond Spekking (Raymond) <raimond.spekking@gmail.com> since January 2007
  * @author Red Baron
+ * @author Reedy
  * @author Remember the dot
  * @author Revolus
  * @author Rillke
@@ -1502,7 +1503,7 @@ Dies kann nicht mehr rückgängig gemacht werden.',
 'gender-unknown' => 'Nicht angegeben',
 'gender-male' => 'Männlich',
 'gender-female' => 'Weiblich',
-'prefs-help-gender' => 'Optional: Wird unter anderem von der Software für die geschlechtsspezifische Anrede genutzt. Diese Information ist <u>öffentlich</u>.',
+'prefs-help-gender' => 'Optional: Wird unter anderem von der Software für die geschlechtsspezifische Anrede genutzt. Diese Information ist öffentlich.',
 'email' => 'E-Mail',
 'prefs-help-realname' => 'Optional. Damit kann dein bürgerlicher Name deinen Beiträgen zugeordnet werden.',
 'prefs-help-email' => 'Die Angabe einer E-Mail-Adresse ist optional, ermöglicht aber die Zusendung eines Ersatzpasswortes, sofern du dein Passwort vergessen hast.',
@@ -1537,9 +1538,9 @@ Dies kann nicht mehr rückgängig gemacht werden.',
 'saveusergroups' => 'Gruppenzugehörigkeit ändern',
 'userrights-groupsmember' => 'Mitglied von:',
 'userrights-groupsmember-auto' => 'Automatisch Mitglied von:',
-'userrights-groups-help' => 'Du kannst die Gruppenzugehörigkeit dieses Benutzers ändern:
-* Ein markiertes Kästchen bedeutet, dass der Benutzer Mitglied dieser Gruppe ist.
-* Ein nichtmarkiertes Kästchen bedeutet, dass der Benutzer nicht Mitglied dieser Gruppe ist.
+'userrights-groups-help' => 'Du kannst die Gruppenzugehörigkeit {{GENDER:$1|dieses Benutzers|dieser Benutzerin}} ändern:
+* Ein markiertes Kästchen bedeutet, dass {{GENDER:$1|der Benutzer|die Benutzerin}} Mitglied dieser Gruppe ist.
+* Ein nichtmarkiertes Kästchen bedeutet, dass {{GENDER:$1|der Benutzer|die Benutzerin}} nicht Mitglied dieser Gruppe ist.
 * Ein * bedeutet, dass du das Benutzerrecht nach Erteilung nicht wieder zurücknehmen kannst (oder umgekehrt).',
 'userrights-reason' => 'Grund:',
 'userrights-no-interwiki' => 'Du hast nicht die erforderliche Berechtigung, um Benutzerrechte in anderen Wikis ändern zu können.',
@@ -3636,7 +3637,7 @@ Weitere werden standardmäßig nicht angezeigt.
 'confirmemail_pending' => 'Es wurde dir bereits ein Bestätigungscode per E-Mail zugeschickt.
 Wenn du dein Benutzerkonto erst vor kurzem erstellt hast, warte bitte noch ein paar Minuten auf die E-Mail, bevor du einen neuen Code anforderst.',
 'confirmemail_send' => 'Bestätigungscode zuschicken',
-'confirmemail_sent' => 'Bestätigungs-E-Mail wurde verschickt.',
+'confirmemail_sent' => 'Die Bestätigungs-E-Mail wurde verschickt.',
 'confirmemail_oncreate' => 'Ein Bestätigungs-Code wurde an deine E-Mail-Adresse gesandt. Dieser Code wird für die Anmeldung nicht benötigt, jedoch wird er zur Aktivierung der E-Mail-Funktionen innerhalb des Wikis gebraucht.',
 'confirmemail_sendfailed' => '{{SITENAME}} konnte die Bestätigungs-E-Mail nicht an dich versenden.
 Bitte prüfe die E-Mail-Adresse auf ungültige Zeichen.
index e02bfd6..13d5169 100644 (file)
@@ -1528,7 +1528,7 @@ keyepel nıka zaf meşğulo yew dema herayi de newe ra tesel bıkerê.',
 'filehist-user' => 'Karber',
 'filehist-dimensions' => 'Dimensiyoni',
 'filehist-filesize' => 'Ebatê dosyayî',
-'filehist-comment' => 'Rexne',
+'filehist-comment' => 'Vatış',
 'filehist-missing' => 'Dosya nieseno',
 'imagelinks' => 'Gurenayışê dosya',
 'linkstoimage' => 'Ena {{PLURAL:$1|pela|$1 pela}} gıreye ena dosya:',
index a06f338..789e13e 100644 (file)
@@ -902,6 +902,8 @@ Njesmějo daś wěcej nježli $2 {{PLURAL:$2|wołanja|wołanjowu|wołanjow|woła
 'node-count-exceeded-warning' => 'Bok jo licbu sukow pśekšocył',
 'expansion-depth-exceeded-category' => 'Boki, źož ekspansiska dłymokosć jo pśekšocona',
 'expansion-depth-exceeded-warning' => 'Bok jo ekspansisku dłymokosć pśekšocył',
+'parser-unstrip-loop-warning' => 'Njeskóńcna kokula namakana',
+'parser-unstrip-recursion-limit' => 'Rekursiska granica pśekšocona ($1)',
 
 # "Undo" feature
 'undo-success' => 'Wobźěłanje móžo se wótpóraś. Pšosym pśeglěduj dołojcne pśirownowanje aby se wěsty był, až to wót wěrnosći coš, a pón składuj změny, aby se wobźěłanje doskóńcnje wótpórało.',
@@ -1078,6 +1080,8 @@ Zaruc, až historija wersijow nastawka jo njepśetergnjona.',
 
 # Diffs
 'history-title' => 'Stawizny wersijow boka „$1“',
+'difference-title' => 'Rozdźěl mjazy wersijami "$1"',
+'difference-title-multipage' => 'Rozdźěl mjazy bokami "$1" a "$2"',
 'difference-multipage' => '(Rozdźěl mjazy bokami)',
 'lineno' => 'Rědka $1:',
 'compareselectedversions' => 'Wuzwólonej wersiji pśirownaś',
index 8dc6ecb..1a4e5db 100644 (file)
@@ -1277,6 +1277,8 @@ $1",
 
 # Diffs
 'history-title' => 'Ιστορικό εκδόσεων για τη σελίδα "$1"',
+'difference-title' => 'Διαφορά μεταξύ των αναθεωρήσεων του "$1"',
+'difference-title-multipage' => 'Διαφορά μεταξύ των σελίδων "$1" και "$2"',
 'difference-multipage' => '(Διαφορές μεταξύ των σελίδων)',
 'lineno' => 'Γραμμή $1:',
 'compareselectedversions' => 'Σύγκριση των εκδόσεων που έχουν επιλεγεί',
@@ -2684,7 +2686,7 @@ $1',
 'proxyblocker-disabled' => 'Η λειτουργία αυτή έχει απενεργοποιηθεί.',
 'proxyblockreason' => 'Η διεύθυνση IP σας έχει υποστεί φραγή γιατί είναι open proxy. Παρακαλούμε επικοινωνείστε με τον παροχέα υπηρεσιών Διαδικτύου που χρησιμοποιείτε ή με την τεχνική υποστήριξη, για να θέσετε υπ΄ όψη τους αυτό το σοβαρό θέμα ασφάλειας.',
 'proxyblocksuccess' => 'Ολοκληρώθηκε!',
-'sorbsreason' => 'Η διεύθνυση IP σας έχει χαρακτηρισθεί ως open proxy στο DNSBL.',
+'sorbsreason' => 'Η διεύθυνση IP σας έχει χαρακτηρισθεί ως open proxy στο DNSBL.',
 'sorbs_create_account_reason' => 'Η διεύθυνση IP σας έχει χαρακτηρισθεί open proxy στο DNSBL. Δεν μπορείτε να δημιουργήσετε λογαριασμό χρήστη.',
 'cant-block-while-blocked' => 'Δεν μπορείτε να φράξετε άλλους χρήστες ενώ είστε φραγμένος/η.',
 'cant-see-hidden-user' => 'Ο χρήστης που προσπαθείτε να αποκλείσετε έχει ήδη αποκλειστεί και αποκρυφτεί.
index c13c9da..e3a1dee 100644 (file)
@@ -2283,8 +2283,9 @@ If the problem persists, contact an [[Special:ListUsers/sysop|administrator]].',
 'backend-fail-writetemp'     => 'Could not write to temporary file.',
 'backend-fail-closetemp'     => 'Could not close temporary file.',
 'backend-fail-read'          => 'Could not read file $1.',
-'backend-fail-create'        => 'Could not create file $1.',
-'backend-fail-maxsize'       => 'Could not create file $1 because it is larger than {{PLURAL:$2|one byte|$2 bytes}}.',
+'backend-fail-create'        => 'Could not write file $1.',
+'backend-fail-maxsize'       => 'Could not write file $1 because it is larger than {{PLURAL:$2|one byte|$2 bytes}}.',
+'backend-fail-usable'        => 'Could not write file $1 due to insufficient permissions or missing directories/containers.',
 'backend-fail-readonly'      => 'The storage backend "$1" is currently read-only. The reason given is: "\'\'$2\'\'"',
 'backend-fail-synced'        => 'The file "$1" is in an inconsistent state within the internal storage backends',
 'backend-fail-connect'       => 'Could not connect to storage backend "$1".',
index dbc3f09..2b89fd7 100644 (file)
@@ -1087,9 +1087,9 @@ Iuj ŝablonoj ne estos inkluzivitaj.',
 'parser-template-loop-warning' => 'Rekursiva ŝablono estis trovita: [[$1]]',
 'parser-template-recursion-depth-warning' => 'Limo de ŝablona profundeco pligrandiĝis ($1)',
 'language-converter-depth-warning' => 'Profundo de lingvo-konvertilo preterpasis limon ($1)',
-'node-count-exceeded-category' => 'Paĝoj kie la nombro da nodoj estis preterpasita',
+'node-count-exceeded-category' => 'Paĝoj kie la nombro da nodoj estas preterpasita',
 'node-count-exceeded-warning' => 'Paĝo preterpasis la nombron da nodoj.',
-'expansion-depth-exceeded-category' => 'Paĝoj en kiuj la ekpansiprofundo estis preterpasita.',
+'expansion-depth-exceeded-category' => 'Paĝoj en kiuj la ekpansiprofundo estas preterpasita',
 'expansion-depth-exceeded-warning' => 'Paĝo preterpasis la ekpansiprofundon.',
 
 # "Undo" feature
index 580d263..6eb3119 100644 (file)
@@ -1521,10 +1521,10 @@ Tu dirección de correo no se revela cuando otros usuarios te contactan.',
 'saveusergroups' => 'Guardar grupos de usuarios',
 'userrights-groupsmember' => 'Miembro de:',
 'userrights-groupsmember-auto' => 'Miembro implícito de:',
-'userrights-groups-help' => 'Puedes modificar los grupos a los que pertenece este usuario:
-* Un recuadro marcado significa que el usuario está en ese grupo.
-* Un recuadro no marcado significa que el usuario no está en ese grupo.
-* Un * indica que no podrás retirar el grupo una vez que lo concedas, o viceversa.',
+'userrights-groups-help' => 'Puedes modificar los grupos a los que pertenece {{GENDER:$1|este usuario|esta usuaria}}:
+* Un recuadro marcado significa que {{GENDER:$1|el usuario|la usuaria}} está en ese grupo.
+* Un recuadro no marcado significa que {{GENDER:$1|el usuario|la usuaria}} no está en ese grupo.
+* Un * indica que no podrás eliminar el grupo una vez que lo agregues, o viceversa.',
 'userrights-reason' => 'Motivo:',
 'userrights-no-interwiki' => 'No tienes permiso para editar los grupos a los que pertenece un usuario en otros wikis.',
 'userrights-nodatabase' => 'La base de datos $1 no existe o no es local.',
index 01bd5f4..e4ea8d9 100644 (file)
@@ -70,6 +70,7 @@
  * @author Yumeki
  * @author Zebulon84
  * @author Zetud
+ * @author Zolo
  * @author Горан Анђелковић
  * @author לערי ריינהארט
  */
@@ -1520,7 +1521,7 @@ Elle ne doit pas dépasser $1 caractère{{PLURAL:$1||s}}.',
 'userrights-groupsmember-auto' => 'Membre implicite de :',
 'userrights-groups-help' => 'Vous pouvez modifier les groupes auxquels appartient cet utilisateur:
 * Une case cochée signifie que l’utilisateur se trouve dans ce groupe.
-* Une case non cochée signifie qu’il ne s’y trouve pas.
+* Une case non cochée signifie qu’{{GENDER:$1|il|elle}} ne s’y trouve pas.
 * Un astérisque (*) indique que vous ne pouvez pas retirer ce groupe une fois que vous l’avez ajouté, ou vice-versa.',
 'userrights-reason' => 'Motif :',
 'userrights-no-interwiki' => 'Vous n’avez pas la permission de modifier des droits d’utilisateurs sur d’autres wikis.',
@@ -1949,7 +1950,7 @@ Pour une sécurité optimale, img_auth.php est désactivé.',
 'upload-curl-error28-text' => 'Le site a mis trop longtemps à répondre. Vérifiez que le site est en ligne, attendez un peu et réessayez. Vous pouvez aussi réessayer à une heure de moindre affluence.',
 
 'license' => 'Licence',
-'license-header' => 'Publié sous licence(s)',
+'license-header' => "Conditions d'utilisation",
 'nolicense' => 'Aucune licence sélectionnée',
 'license-nopreview' => '(Prévisualisation non disponible)',
 'upload_source_url' => ' (une URL valide et accessible publiquement)',
index 36fbd6c..591ee40 100644 (file)
@@ -407,9 +407,8 @@ $2',
 'ns-specialprotected' => 'Spetsjåålside koone ai beårbed wårde.',
 'titleprotected' => 'En sid ma dideer noome koon ai önjläid wårde.
 Jü späre wörd döör [[User:$1|$1]] ma grün "$2" inruchted.',
-'filereadonlyerror' => "Det datei „$1“ koon ei feranert wurd, auer uun det fertiaknis „$2“ bluat leesen wurd koon.
-
-Di grünj as „''$3''“.",
+'filereadonlyerror' => 'Det datei „$1“ koon ei feranert wurd, auer uun det fertiaknis „$2“ bluas leesen wurd koon.
+Di grünj faan di administraator as: „$3“.',
 
 # Virus scanner
 'virus-badscanner' => "Hiinje konfigurasjoon: ünbekånde fiirusscanner: ''$1''",
@@ -601,7 +600,7 @@ Tidwis paasuurd: $2',
 'subject' => 'Bedrååwet:',
 'minoredit' => 'Bloot kleenihäide wörden feränred',
 'watchthis' => 'Kiike eefter jüdeer sid',
-'savearticle' => 'Sid spikre',
+'savearticle' => 'Sidj seekre',
 'preview' => 'Forlök',
 'showpreview' => 'Forlök wise',
 'showlivepreview' => 'Live-forkiik',
@@ -1505,7 +1504,7 @@ Hål di '''naie''' tiitel uner '''muul''' önjdreege, deeruner jü ambenååming
 'tooltip-ca-nstab-help' => 'Heelpsid wise',
 'tooltip-ca-nstab-category' => 'Kategoriisid wise',
 'tooltip-minoredit' => 'Jüdeer änring as latj markiire.',
-'tooltip-save' => 'Änringe spikre',
+'tooltip-save' => 'Feranerangen seekre',
 'tooltip-preview' => 'Forlök foon da änringe bai jüdeer sid. Hål for dåt spikern brüke!',
 'tooltip-diff' => 'Änringe bai di täkst wise',
 'tooltip-compareselectedversions' => 'Ferschääl twasche tou ütwäälde färsjoone foon jüdeer sid wise.',
index 2729d38..cd4a7f6 100644 (file)
@@ -11,6 +11,7 @@
  * @author Kaganer
  * @author Klenje
  * @author MF-Warburg
+ * @author Reedy
  * @author Urhixidur
  * @author לערי ריינהארט
  */
@@ -1349,7 +1350,7 @@ tu âs di cognossi lis conseguencis prime di lâ indevant.",
 In chescj câs, tu varâs di movi o unî a man lis informazions contignudis te pagjine di discussion, se tu lu desideris.",
 'movearticle' => 'Môf la vôs',
 'movenologin' => 'No tu sês jentrât',
-'movenologintext' => 'Tu âs di jessi un utent regjistrât e <a href="{{localurl:Special:UserLogin}}">jentrât</a> par movi une pagjine.',
+'movenologintext' => 'Tu âs di jessi un utent regjistrât e [[Special:UserLogin|jentrât]] par movi une pagjine.',
 'movenotallowed' => 'No tu âs i permès che a coventin par movi lis pagjinis.',
 'newtitle' => 'Al gnûf titul',
 'move-watch' => 'Ten di voli cheste pagjine',
index 539bdb0..130d0a0 100644 (file)
@@ -14,6 +14,7 @@
  * @author Kwekubo
  * @author Moilleadóir
  * @author Moydow
+ * @author Reedy
  * @author Spacebirdy
  * @author Stifle
  * @author Tameamseo
@@ -1589,7 +1590,7 @@ Tá dualgas ort bheith cinnte go rachaidh na naisc chuig an áit is ceart.
 Tabhair faoi deara '''nach''' n-athainmneofar an leathanach má tá leathanach ann cheana féin faoin teideal nua, ach amháin más folamh nó atreorú é nó mura bhfuil aon stair athraithe aige cheana.
 Mar sin, is féidir leathanach a athainmniú ar ais chuig an teideal a raibh air roimhe má tá botún déanta agat, agus ní féidir leathanach atá ann cheana a fhorscríobh.
 
-<font color=\"red\">'''Rabhadh!'''</font>
+'''Rabhadh!'''
 Is féidir gur dianbheart gan choinne é athrú a dhéanamh ar leathanach móréilimh;
 cinntigh go dtuigeann tú na hiarmhairtí go léir roimh dul ar aghaigh.",
 'movepagetalktext' => "Aistreofar an leathanach plé go huathoibríoch '''ach ní tharlófar sin''':
index b5acea6..c93ad92 100644 (file)
@@ -1013,12 +1013,14 @@ Algúns modelos non se incluirán.",
 Estes argumentos foron omitidos.",
 'post-expand-template-argument-category' => 'Páxinas que conteñen argumentos de modelo omitidos',
 'parser-template-loop-warning' => 'Detectouse un modelo en bucle: [[$1]]',
-'parser-template-recursion-depth-warning' => 'Excedeuse o límite da profundidade do recurso do modelo ($1)',
+'parser-template-recursion-depth-warning' => 'Excedeuse o límite de profundidade de recursión do modelo ($1)',
 'language-converter-depth-warning' => 'Excedeuse o límite de profundidade do convertedor de lingua ($1)',
 'node-count-exceeded-category' => 'Páxinas nas que se supera o número de nodos',
 'node-count-exceeded-warning' => 'Páxina que supera o número de nodos',
 'expansion-depth-exceeded-category' => 'Páxinas nas que se supera a profundidade de expansión',
 'expansion-depth-exceeded-warning' => 'Páxina que supera a profundidade de expansión',
+'parser-unstrip-loop-warning' => 'Detectouse un bucle inamovible',
+'parser-unstrip-recursion-limit' => 'Excedeuse o límite de recursión inamovible ($1)',
 
 # "Undo" feature
 'undo-success' => 'A edición pódese desfacer.
@@ -1196,6 +1198,8 @@ Asegúrese de que esta modificación da páxina mantén a continuidade históric
 
 # Diffs
 'history-title' => 'Historial de revisións de "$1"',
+'difference-title' => 'Diferenzas entre revisións de "$1"',
+'difference-title-multipage' => 'Diferenzas entre as páxinas "$1" e "$2"',
 'difference-multipage' => '(Diferenzas entre páxinas)',
 'lineno' => 'Liña $1:',
 'compareselectedversions' => 'Comparar as versións seleccionadas',
index d7597c4..9d0b04e 100644 (file)
@@ -1320,6 +1320,8 @@ $1",
 
 # Diffs
 'history-title' => 'היסטוריית הגרסאות של $1',
+'difference-title' => 'הבדלים בין גרסאות של "$1"',
+'difference-title-multipage' => 'הבדלים בין הדפים $1 ו{{GRAMMAR:תחילית|$2}}',
 'difference-multipage' => '(הבדלים בין דפים)',
 'lineno' => 'שורה $1:',
 'compareselectedversions' => 'השוואת הגרסאות שנבחרו',
index d1b744d..a056e70 100644 (file)
@@ -977,6 +977,7 @@ Posljednja stavka evidencije blokiranja navedena je niže kao napomena:',
 'updated' => '(Ažurirano)',
 'note' => "'''Napomena:'''",
 'previewnote' => "'''Ne zaboravite da je ovo samo pregled kako će stranica izgledati i da stranica još nije snimljena!'''",
+'continue-editing' => 'Nastavi uređivati',
 'previewconflict' => 'Ovaj pregled odražava stanje u gornjem polju za unos koje će biti sačuvano
 ako pritisnete "Sačuvaj stranicu".',
 'session_fail_preview' => "'''Ispričavamo se! Nismo mogli obraditi Vašu izmjenu zbog gubitka podataka o prijavi.
index e07cbf6..25a3700 100644 (file)
@@ -1078,6 +1078,8 @@ Zawěsć, zo tuta změna stawiznisku kontinuitu strony wobchowuje.',
 
 # Diffs
 'history-title' => 'Stawizny wersijow strony „$1“',
+'difference-title' => 'Rozdźěl mjez wersijemi "$1"',
+'difference-title-multipage' => 'Rozdźěl mjez stronami "$1" a "$2"',
 'difference-multipage' => '(Rozdźěl mjez stronami)',
 'lineno' => 'Rjadka $1:',
 'compareselectedversions' => 'Wubranej wersiji přirunać',
index 25312b7..79c8f43 100644 (file)
@@ -1132,6 +1132,8 @@ Nota que le uso del ligamines de navigation causara le perdita de tote cambios i
 
 # Diffs
 'history-title' => 'Historia de versiones de "$1"',
+'difference-title' => 'Differentia inter versiones de "$1"',
+'difference-title-multipage' => 'Differentia inter paginas "$1" e "$2"',
 'difference-multipage' => '(Differentia inter paginas)',
 'lineno' => 'Linea $1:',
 'compareselectedversions' => 'Comparar versiones seligite',
index 3dd161b..18133a4 100644 (file)
@@ -8,6 +8,7 @@
  * @file
  *
  * @author Amire80
+ * @author Reedy
  * @author Sapral Mikail
  * @author Tagir
  */
@@ -1134,7 +1135,7 @@ $messages = array(
 #Укх # тамагIалгаца дIадувлаш дола мугIанаш, оалам мо лоархаш да.
 #МугIанаш яздaтакха каьда да
 
-#Каст-каста оаламаш укх мугIа лакхе дIаязаде. Из мугI ший долаш тайпара дита<pre>',
+#Каст-каста оаламаш укх мугIа лакхе дIаязаде. Из мугI ший долаш тайпара дита</pre>',
 
 # Special:Tags
 'tag-filter' => '[[Special:Tags|Йоазоний]] цIенаярг:',
index bcaab65..092ae11 100644 (file)
@@ -1240,7 +1240,7 @@ Athugaðu að skrár þeirra yfir {{SITENAME}}-efni kunna að vera úreltar.',
 'columns' => 'Dálkar',
 'searchresultshead' => 'Leit',
 'resultsperpage' => 'Niðurstöður á síðu',
-'stub-threshold' => 'Þröskuldur fyrir sniði <a href="#" class="stub">stubbatengla</a> (bæt):',
+'stub-threshold' => 'Þröskuldur fyrir <a href="#" class="stub">stubbatengla</a> (bæt):',
 'stub-threshold-disabled' => 'Óvirkt',
 'recentchangesdays' => 'Fjöldi daga sem nýlegar breytingar ná yfir:',
 'recentchangesdays-max' => '(hámark $1 {{PLURAL:$1|dag|daga}})',
index 5fbd184..f111eb1 100644 (file)
@@ -853,7 +853,7 @@ Password temporanea: $2',
 'summary-preview' => "Anteprima dell'oggetto:",
 'subject-preview' => 'Anteprima oggetto/intestazione:',
 'blockedtitle' => 'Utente bloccato.',
-'blockedtext' => "'''Questo nome utente o indirizzo IP sono stati bloccati.'''
+'blockedtext' => "'''Il tuo nome utente o indirizzo IP è stato bloccato.'''
 
 Il blocco è stato imposto da $1. La motivazione del blocco è la seguente: ''$2''
 
@@ -1191,8 +1191,8 @@ Vedi l'[[Special:BlockList|elenco dei blocchi]] per l'elenco dei bandi e dei blo
 
 # Diffs
 'history-title' => 'Cronologia delle modifiche di "$1"',
-'difference-title' => 'Differenza tra le revisioni di " $1 "',
-'difference-title-multipage' => 'Differenza tra le pagine " $1 "e" $2 "',
+'difference-title' => 'Differenza tra le versioni di "$1"',
+'difference-title-multipage' => 'Differenza tra le pagine "$1" e "$2"',
 'difference-multipage' => '(Differenze fra le pagine)',
 'lineno' => 'Riga $1:',
 'compareselectedversions' => 'Confronta le versioni selezionate',
index 8fb968d..f56253c 100644 (file)
@@ -1035,9 +1035,9 @@ $1または他の[[{{MediaWiki:Grouppage-sysop}}|管理者]]にこの件につ
 IP アドレスは複数の利用者で共有されている場合があります。
 もし、あなたが匿名利用者であり、自分に関係のないコメントが寄せられている考えられる場合は、[[Special:UserLogin/signup|アカウントを作成する]]か[[Special:UserLogin|ログインして]]他の匿名利用者と間違えられないようにしてください。''",
 'noarticletext' => '現在このページには内容がありません。
-他のページ内で[[Special:Search/{{PAGENAME}}|このページ名を検索する]]か、
+他のページ内で[[Special:Search/{{PAGENAME}}|このページ名を検索]]するか、
 <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} 関連する記録を検索]するか、
-あるいは、[{{fullurl:{{FULLPAGENAME}}|action=edit}} このページを編集]</span>できます。',
+[{{fullurl:{{FULLPAGENAME}}|action=edit}} このページを編集]</span>することができます。',
 'noarticletext-nopermission' => '現在このページには内容がありません。他のページに含まれる[[Special:Search/{{PAGENAME}}|このページ名を検索する]]か、もしくは<span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} 関連記録を検索する]</span>ことができます。',
 'userpage-userdoesnotexist' => '「$1」という利用者アカウントは登録されていません。
 このページの作成/編集が適切かどうか確認してください。',
@@ -2389,7 +2389,7 @@ contenttype/subtypeの形式で指定してください(例:<tt>image/jpeg</
 'mywatchlist' => 'ウォッチリスト',
 'watchlistfor2' => '利用者: $1 $2',
 'nowatchlist' => 'ウォッチリストに項目がありません。',
-'watchlistanontext' => 'ウォッチリストに入っている項目を表示または編集するには、$1してください。',
+'watchlistanontext' => 'ウォッチリストにある項目を閲覧または編集するには、$1してください。',
 'watchnologin' => 'ログインしていません',
 'watchnologintext' => 'ウォッチリストを変更するためには、[[Special:UserLogin|ログイン]]している必要があります。',
 'addwatch' => 'ウォッチリストに追加',
@@ -3090,9 +3090,9 @@ MediaWiki 全般のローカライズ(地域化)に貢献したい場合は
 'tooltip-n-mainpage' => 'メインページに移動',
 'tooltip-n-mainpage-description' => 'メインページに移動する',
 'tooltip-n-portal' => 'このプロジェクトについて、できること、情報を入手する場所',
-'tooltip-n-currentevents' => 'æ\9c\80è¿\91ã\81®å\87ºæ\9d¥äº\8bã\81«ã\81¤ã\81\84ã\81¦äº\88å\82\99ç\9f¥è­\98ã\82\92å¾\97る',
+'tooltip-n-currentevents' => 'æ\9c\80è¿\91ã\81®å\87ºæ\9d¥äº\8bã\81®è\83\8cæ\99¯ã\82\92ç\9f¥る',
 'tooltip-n-recentchanges' => 'このウィキにおける最近の更新の一覧',
-'tooltip-n-randompage' => '無作為に抽出されたページの読み込み',
+'tooltip-n-randompage' => '無作為に選ばれたページを読み込む',
 'tooltip-n-help' => '情報を得る場所',
 'tooltip-t-whatlinkshere' => 'ここにリンクしている全ウィキページの一覧',
 'tooltip-t-recentchangeslinked' => 'このページからリンクしているページの最近の更新',
index 0a4ebde..9f45136 100644 (file)
@@ -535,6 +535,8 @@ $2',
 'filereadonlyerror' => 'ფაილი "$1" შეცვლა ვერ ხერხდება, რადგანაც ფაილის საცავი "$2" მხოლოდ კითხვის რეჟიმშია.
 
 ადმინისტრატორი რომელმაც ის დაბლოკა მიუთითა შემდეგი მიზეზი: "$3".',
+'invalidtitle-knownnamespace' => 'დაუშვებელი სათაური სახელთა სივრცე "$2" და ტექსტი "$3"-თან',
+'invalidtitle-unknownnamespace' => 'დაუშვებელი სათაური უცნობი სახელთა სივრცის ნომერი $1 და ტექსტი "$2"-ით',
 
 # Virus scanner
 'virus-badscanner' => "შეცდომა. ვირუსთა უცნობი სკანერი: ''$1''",
@@ -931,6 +933,11 @@ $2
 'parser-template-loop-warning' => 'აღმოჩენილია ლუპი თარგ: [[$1]]-ში',
 'parser-template-recursion-depth-warning' => 'თარგის რეკურსიის სიღრმე აემატება დაშვებულს ($1)',
 'language-converter-depth-warning' => 'ენათა გადამუშავების კონვერციის ლიმიტი ამოწურულია ($1)',
+'node-count-exceeded-category' => 'გვერდები, რომელშიც გადამეტებულია კვანძების რაოდენობა',
+'node-count-exceeded-warning' => 'გვერდზე გადამეტებულია კვანძების რაოდენობა',
+'expansion-depth-exceeded-category' => 'გვერდები გახსნის სიღრმის გადამეტებით',
+'expansion-depth-exceeded-warning' => 'გვერდზე გადამეტებულია ჩადგმების ზღვარი',
+'parser-unstrip-recursion-limit' => 'გადამეტებულია რეკურსიის ზღვარი ($1)',
 
 # "Undo" feature
 'undo-success' => 'რედაქტირების გაუქმება შესაძლებელია. გთხოვთ შეამოწმოთ განსხვავება ქვევით, რათა დარწმუნდეთ, რომ ეს ის არის რაც თქვენ გსურთ, შემდეგ კი შეინახეთ ცვლილებები რათა დაასრულოთ რედაქტირების გაუქმება.',
@@ -1109,6 +1116,8 @@ $1",
 
 # Diffs
 'history-title' => 'ცვლილებათა ისტორია სტატიაში „$1“',
+'difference-title' => 'განსხვავება გადახედვებს შორის " $1 "',
+'difference-title-multipage' => 'განსხვავება „$1“ და „$2“ გვერდებს შორის',
 'difference-multipage' => '(განსხვავება გვერდებს შორის)',
 'lineno' => 'ხაზი $1:',
 'compareselectedversions' => 'არჩეული ვერსიების შედარება',
index 52e77bb..b585f0f 100644 (file)
@@ -744,7 +744,7 @@ $3 keltirilgen sebebi: ''$2''",
 'last' => 'aqır.',
 'page_first' => 'birinshi',
 'page_last' => "aqırg'ı",
-'histlegend' => "Tu'sindirme: salıstırajaq nusqaların'ızdı saylan' ha'mde <Enter> knopkasın yamasa to'mendegi knopkani basın'.<br />
+'histlegend' => "Tu'sindirme: salıstırajaq nusqaların'ızdı saylan' ha'mde Enter knopkasın yamasa to'mendegi knopkani basın'.<br />
 Sha'rtli belgiler: (ha'z.) = ha'zirgi nusqasi menen parqı,
 (aqır.) = aldıng'ı nusqasi menen parqı, k = kishi o'zgeris",
 'history-fieldset-title' => 'Tariyxınan izlew',
index 64ea2d5..b85d18d 100644 (file)
@@ -575,7 +575,7 @@ wat en Üvverschrefte nit erlaub es.
 Et künnt ussinn, wie ene InterWikiLink,
 dat jeiht ävver nit.
 Muss De repareere.',
-'perfcached' => 'Di Daate heh noh kumme usem Zweschespeicher (<l lang="en">cache</i>) un künnte nit mieh janz de allerneuste sin.
+'perfcached' => 'Di Daate heh noh kumme usem Zweschespeicher (cache) un künnte nit mieh janz de allerneuste sin.
 {{PLURAL:$1|Bloß ein Antwoot es|Nit mieh wi $1 Antwoote sin|Kein Antwoot es}} doh faßjehallde un ze han.',
 'perfcachedts' => 'De Daate heenoh kumme usem Zweschespeicher (Cache) un woodte aam $2 öm $3 opjenumme. Se künnte nit janz de allerneuste sin.
 {{PLURAL:$4|Bloß ein Antwoot es|Nit mieh wi $4 Antwoote sind|Kein Antwoot es}} doh ze han.',
index dc78c8d..5624fd9 100644 (file)
@@ -641,6 +641,7 @@ Astengkirina dawî bi referansa li jêr hatiye piştrastkirin:',
 'updated' => '(Hate rojanekirin)',
 'note' => "'''Nîşe:'''",
 'previewnote' => "'''Ji bîr neke ku ev bi tenê çavdêriyek e, ev rûpel hîn nehatiye tomarkirin!'''",
+'continue-editing' => 'Guhertinê bidomîne',
 'editing' => 'Biguherîne: "$1"',
 'editingsection' => 'Tê guherandin: $1 (beş)',
 'editingcomment' => '$1 (şîrove) tê guherandin.',
index 18e5c43..6cc4e75 100644 (file)
@@ -552,6 +552,8 @@ $2',
 'customjsprotected' => "Dir hutt net d'Recht dës JavaScript-Säit z'änneren, well dorop déi perséinlech Astellunge vun engem anere Benotzer gespäichert sinn.",
 'ns-specialprotected' => 'Spezialsäite kënnen net verännert ginn.',
 'titleprotected' => "Eng Säit mat dësem Numm kann net ugeluecht ginn. Dës Spär gouf vum [[User:$1|$1]] gemaach deen als Grond ''$2'' uginn huet.",
+'invalidtitle-knownnamespace' => 'Net valabelen Titel mam Nummraum "$2" a mam Text "$3"',
+'invalidtitle-unknownnamespace' => 'Net valabelen Titel mat der onbekannter Nummraum-Zuel $1 a mam Text "$2"',
 
 # Virus scanner
 'virus-badscanner' => "Schlecht Configuratioun: onbekannte  Virescanner: ''$1''",
@@ -1010,7 +1012,7 @@ Dir kënnt dësen Ënnerscheed gesinn; Detailer fannt Dir am [{{fullurl:{{#Speci
 'revdelete-no-file' => 'De Fichier deen ugi war gëtt et net.',
 'revdelete-show-file-confirm' => 'Sidd Dir sécher datt Dir déi geläschte Versioun vum Fichier "<nowiki>$1</nowiki>" vum $2 ëm $3 gesi wëllt?',
 'revdelete-show-file-submit' => 'Jo',
-'revdelete-selected' => "'''{{PLURAL:$2|Gewielte Versioun|Gewielte Versioune}} vu(n) '''$1''' :'''",
+'revdelete-selected' => "'''{{PLURAL:$2|Gewielt Versioun|Gewielt Versioune}} vu(n) '''$1''' :'''",
 'logdelete-selected' => "'''Ausgewielten {{PLURAL:$1|Evenement|Evenementer}} aus dem Logbuch:'''",
 'revdelete-text' => "'''Geläschte Versiounen oder aner geläschte Bestanddeeler sinn net méi ëffentlech zougänglech, si stinn awer weiderhin an der Versiounsgeschicht vun der Säit.'''
 Aner {{SITENAME}}-Administrateure kënnen de geläschten Inhalt oder aner geläschte Bestanddeeler weiderhi gesinn a restauréieren, et sief, et gouf festgeluecht, datt déi Limitatioune vum Accès och fir Administrateure gëllen.",
@@ -1031,7 +1033,7 @@ Aner {{SITENAME}}-Administrateure kënnen de geläschten Inhalt oder aner geläs
 'revdelete-suppress' => 'Grond vum Läschen och fir Administrateure verstoppt',
 'revdelete-unsuppress' => 'Limitatiounen fir restauréiert Versiounen ophiewen',
 'revdelete-log' => 'Grond:',
-'revdelete-submit' => 'Op déi gewielte {{PLURAL:$1|Versioun|Versiounen}} uwenden',
+'revdelete-submit' => 'Op déi gewielt {{PLURAL:$1|Versioun|Versiounen}} uwenden',
 'revdelete-success' => "'''Sichtbarkeet vun de Versioune gouf aktualiséiert.''''",
 'revdelete-failure' => "'''Sichtbarkeet vun der Versioun konnt net aktualiséiert ginn:'''
 $1",
@@ -2879,7 +2881,7 @@ Dëst warscheinlech duerch en externe Link den op der schwaarzer Lëscht (blackl
 'markaspatrolleddiff' => 'Als nogekuckt markéieren',
 'markaspatrolledtext' => 'Dës Säit als nogekuckt markéieren',
 'markedaspatrolled' => 'ass als nogekuckt markéiert',
-'markedaspatrolledtext' => 'Déi gewielte Versioun vu(n) [[:$1]] gouf als nogekuckt markéiert.',
+'markedaspatrolledtext' => 'Déi gewielt Versioun vu(n) [[:$1]] gouf als nogekuckt markéiert.',
 'rcpatroldisabled' => 'Rezent Ännerungskontroll ausgeschalt.',
 'rcpatroldisabledtext' => "D'Kontroll vun de leschten Ännerungen ass elo ausgeschalt.",
 'markedaspatrollederror' => 'Kann net als "nogekuckt" markéiert ginn.',
index 0fce327..9eff5a7 100644 (file)
@@ -60,11 +60,11 @@ $messages = array(
 
 'underline-always' => 'Ziah/ngei ngei',
 'underline-never' => 'Ngai lo',
-'underline-default' => 'Browser duhdàn',
+'underline-default' => 'Rängpuifanna duhdàn',
 
 # Font style option in Special:Preferences
 'editfont-style' => 'Siamţhatna hmun hawrawp pian',
-'editfont-default' => 'Browser duhdàn',
+'editfont-default' => 'Rängpuifanna duhdàn',
 'editfont-monospace' => 'Hawrawp inkar rualkhai',
 'editfont-sansserif' => 'Sans-serif hawrawp',
 'editfont-serif' => 'Serif hawrawp',
@@ -87,11 +87,11 @@ $messages = array(
 'january' => 'Pawlkut',
 'february' => 'Ramtuk',
 'march' => 'Vau',
-'april' => 'Ţau',
-'may_long' => 'Ţomir',
+'april' => 'au',
+'may_long' => 'omir',
 'june' => 'Nikir',
 'july' => 'Vawkhniahzawn',
-'august' => 'Thiţin',
+'august' => 'Thiin',
 'september' => 'Mimkut',
 'october' => 'Khuangchawi',
 'november' => 'Sahmulphah',
@@ -182,7 +182,7 @@ $messages = array(
 'errorpagetitle' => 'Dik lo',
 'returnto' => '$1 phekah kir leh rawh.',
 'tagline' => '{{SITENAME}} aţangin',
-'help' => 'Ţanpuina',
+'help' => 'anpuina',
 'search' => 'Zawnna',
 'searchbutton' => 'Zawng rawh le',
 'go' => 'Kal rawh le',
@@ -967,6 +967,7 @@ Hmangtuten e-lehkha an thawn chein i e-chenhmun hrilh an ni chuang lo vang.',
 'minoreditletter' => 't',
 'newpageletter' => 'T',
 'boteditletter' => 'k',
+'newsectionsummary' => '/* $1 */ hläwm thar',
 'rc-enhanced-expand' => 'Tilang kim rawh (JavaScript a ngai)',
 'rc-enhanced-hide' => 'Thup ţhenna',
 'rc-old-title' => 'Atìra "&1" tih hming pú-a siam.',
@@ -995,16 +996,25 @@ Hmangtuten e-lehkha an thawn chein i e-chenhmun hrilh an ni chuang lo vang.',
 'upload-recreate-warning' => "'''Vaukhànna: Hemi hming pu taksa hi sawn tawh emaw paih tawh a ni.'''
 
 I ràwnah paihna leh sawnna chhinchhiahna thuziak kan rawn chhawpchhuak e:",
+'uploadtext' => "Taksa hlankai nan a hnuaia lehkha hi hmang rawh.
+Ahmaa taksa hlankaisaho en tùr emaw zawng tùr chuan [[Special:FileList|taksa hlankai tawh zawng zawng tlarna]] tihah hian kal rawh; hlankai (nawn)ho pawh [[Special:Log/upload|hlankai chhinchhiahna]]-ah vawnfel an ni a, paih tawhho pawh [[Special:Log/delete|paihho chhinchhiahna]]-ah chhinchhiah fel vek an ni.
+
+Phêka taksa hmang tùrin ahnuaia tihphung engemaw ni ber hmang khuan zawmna i siam thei ang:
+*A taksa pumpui hmang tùr chuan '''<tt><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.jpg]]</nowiki></tt>''' tiin. Heti hi chuan taksa hi i sezawl chhuah a ni.
+*Phêk veilam síra 'Sawifiahna' hmanga 200px-a liana i tàrlan duh chuan '''<tt><nowiki>[[</nowiki>{{ns:file}}<nowiki>:File.png|200px|thumb|left|Sawifiahna]]</nowiki></tt>'''  tiin.
+*A taksa tárlang lova zawm ringawt i duh chuan '''<tt><nowiki>[[</nowiki>{{ns:media}}<nowiki>:File.ogg]]</nowiki></tt>''' tiin.",
 'upload-permitted' => 'Taksa phal chiho: $1.',
 'upload-preferred' => 'Taksa duh deuh bîk: $1.',
 'upload-prohibited' => 'Taksa khap: $1.',
-'uploadlog' => 'chanchin hlankaina',
+'uploadlog' => 'hlankai chhinchhiahna',
 'uploadlogpage' => 'Hlankai chhinchhiahna',
+'uploadlogpagetext' => 'Taksa hlankai thar deuh deuh kan rawn tlar chhuak e.
+A aia hmuhnawm deuh zâwka i thlìr duh chuan [[Special:NewFiles|taksa hlankai thar tàrhmunpui]]-ah i kal thei ang.',
 'filename' => 'Taksahming',
-'filedesc' => 'Laktawi',
-'fileuploadsummary' => 'Kaihtawi:',
+'filedesc' => 'Sawifiahna täwi',
+'fileuploadsummary' => 'Sawifiahna täwi:',
 'filereuploadsummary' => 'Taksa tihdanglamna:',
-'filestatus' => 'Copyright dinhmun:',
+'filestatus' => 'Lâkchhàwn phalphung dinhmun:',
 'filesource' => 'Hnar:',
 'uploadedfiles' => 'Taksa hlankai tawhte',
 'ignorewarning' => 'Vaukhanna ngaihthah la taksa dahţha lui rawh',
@@ -1014,7 +1024,7 @@ I ràwnah paihna leh sawnna chhinchhiahna thuziak kan rawn chhawpchhuak e:",
 A hming thlâk la bei ţha leh rawh.',
 'filename-toolong' => 'Taksahming 240 bytes aiin a sei tùr a ni lo.',
 'badfilename' => 'Taksahming "$1"-ah thlâk a ni.',
-'filetype-missing' => 'Taksa in tawpna a nei lo (entirna ".jpg").',
+'filetype-missing' => 'Taksain tawpna a nei lo (entirna ".jpg").',
 'empty-file' => 'I taksa thehluh kha a ruak.',
 'file-too-large' => 'A lian leh lutuk.',
 'filename-tooshort' => 'Taksahming a sawi leh lutuk.',
@@ -1024,13 +1034,48 @@ A hming thlâk la bei ţha leh rawh.',
 'illegal-filename' => 'Taksahming phal loh.',
 'overwrite' => 'Taksa awmsa ziah hnan khap a ni.',
 'unknown-error' => 'Dikhlelhna hriat loh a lo thleng.',
+'tmp-create-error' => 'Taksa lailâwk a siam theih loh.',
+'tmp-write-error' => 'Taksa lailâwk ziah a tlawlh',
+'large-file' => 'Taksa rëng rëng $1 aia lian lo tùra duh a ni;
+he taksa hi $2 lái a ni.',
+'largefileserver' => 'Hë taksa hi rawngbawltu phaltir zât aia ritsak a ni.',
+'windows-nonascii-filename' => 'Hë wiki hian taksahminga chhinchhiahna bîk tel a pawm thei lo.',
+'savefile' => 'Taksa dahṭhatna',
 'uploadedimage' => 'hlankai: "[[$1]]"',
+'upload-source' => 'Hnar taksa',
+'sourcefilename' => 'Hnar taksahming:',
+'sourceurl' => 'Hnar URL:',
+'destfilename' => 'Tumhmun taksahming:',
+'upload-maxfilesize' => 'Taksa lenzáwng bituk: $1 aia lian lo.',
+'upload-description' => 'Taksa sawifiahna',
+'upload-options' => 'Hlankai duhdàn thlanna',
+'watchthisupload' => 'Hë taksa hi vil rawh',
+'filewasdeleted' => 'He hming pu taksa hi ahmaah lo hlankai tawh a ni a, paihbo leh nghâl a ni.
+Hlankai leh i tum hmain $1 i thlïthläi deuh dawn nia.',
+'upload-success-subj' => 'Hlawhtling taka hlankai a ni',
+'upload-success-msg' => '[$2] aṭangin i hlangkai hlawhtling ta e. Hetah hian hman theihin a awm ta: [[:{{ns:file}}:$1]]',
+'upload-failure-subj' => 'Hlankai rokhawlhna',
+'upload-failure-msg' => '[$2] aṭanga i hlankai tumnaah rokhawlhna a awm tlat:
+
+$1',
+'upload-warning-subj' => 'Hlankai vauhkhànna',
+'upload-warning-msg' => '[$2] aṭanga i hlankaiah rokhawlhna a awm tlat. [[Special:Upload/stash/$1|Hlankaina lehkha]]-ah chingfel tùrin i lêt leh thei ang.',
+
+'upload-proto-error' => 'Inpawhphung dikhlel',
+'upload-file-error' => 'Chhúnglam dik lohna',
 
-'license' => 'Phalna:',
-'license-header' => 'Phalna:',
+'license' => 'Phalphung:',
+'license-header' => 'Phalphung:',
+'nolicense' => 'I la thlang lo',
+'license-nopreview' => '(Endik chhin theih loh)',
+'upload_source_url' => '(URL tláng pawh theih, nung bawk)',
+'upload_source_file' => '(i khawlthlûakneia mi taksa)',
 
 # Special:ListFiles
-'imgfile' => 'taksa (file)',
+'listfiles-summary' => 'Hë vohbîk phêk hian taksa hlankai tawh zawng zawng a pholang.
+Hmangtu azira i thliarhran erawh chuan a hmangtuina a hlankai hnuhnüng ber taksa chauh pholan a ni.',
+'listfiles_search_for' => 'Media hming zawnna:',
+'imgfile' => 'taksa',
 'listfiles' => 'Taksa tlarna',
 'listfiles_thumb' => 'Kutbï',
 'listfiles_date' => 'Ni',
@@ -1059,9 +1104,21 @@ A hming thlâk la bei ţha leh rawh.',
 'filehist-missing' => 'Taksa a awm lo',
 'imagelinks' => 'Bungraw hmanna',
 'linkstoimage' => 'A hnuai  {{PLURAL:$1|phek 1|phek $1-te}} hian he taksa hi a hmang:',
+'linkstoimage-more' => 'Hë taksa hi phêk {{PLURAL:$1||}} $1 aia tamin a zawm/hmang.
+Ahnuaih hian {{PLURAL:$1|zawmtu hmasa ber|zawmtu hmasa $1-te}} kan rawn tlar chhuak e.
+Zawmtu zawng zawng [[Special:WhatLinksHere/$2|tlarchhuahna hetah hian a awm]] e.',
 'nolinkstoimage' => 'He taksa zawmtu/hmanna phêk pakhat mah a awm lo.',
+'morelinkstoimage' => 'Hemi taksa zawmpui dang [[Special:WhatLinksHere/$1|enna}}.',
+'linkstoimage-redirect' => '$1 (taksa hruailuhna) $2',
+'sharedupload' => 'Hë taksa hi $1-a mi a ni a, hna-hmachhawp dangin a hmang vè mai thei.',
+'sharedupload-desc-there' => 'Hë taksa hi $1-a mi a ni a, hna-hmachhawp dangin a hmang ve mai thei.
+Hriattirna dang chu [$2 taksa sawifiahna phêk]-ah hian i en thei ang.',
 'sharedupload-desc-here' => 'He taksa hi $1-a mi a ni a, hna-hmachhawp dangin an hmang ve mai thei.
-[Taksa sawifiahna phek $2]-a sawifiahna lang hetah hian kan rawh chhawp chhuak e.',
+[$2 Taksa sawifiahna phek]-a sawifiahna lang hetah hian kan rawh chhawp chhuak e.',
+'sharedupload-desc-edit' => 'Hë taksa hi $1-a mi a ni a, hna-hmachhawp dangin a hmang vè mai thei.
+Taksa sawifiahna hi i siamṭha duh a nih chuan  [$2 taksa sawifiahna phêk] aṭang hian i siamṭha thei ang.',
+'sharedupload-desc-create' => 'Hë taksa hi $1-a mi a ni a, hna-hmachhawp dangin a hmang vè mai thei.
+Taksa sawifiahna hi i siamṭha duh a nih chuan  [$2 taksa sawifiahna phêk] aṭang hian i siamṭha thei ang.',
 'filepage-nofile' => 'He hmingpu taksa a awm lo',
 'filepage-nofile-link' => 'He hming pu taksa hi a awm lo va, mahsé i [$1 hlangkai thei] ang.',
 'uploadnewversion-linktext' => 'He taksa chhuah thar hi hlangkai rawh',
@@ -1072,15 +1129,60 @@ A hming thlâk la bei ţha leh rawh.',
 'filerevert' => '$1 tilêt rawh',
 'filerevert-legend' => 'Taksa tilêt rawh',
 
+# MIME search
+'mimetype' => 'MIME chî:',
+'download' => 'hnuhthlâkna',
+
+# Unwatched pages
+'unwatchedpages' => 'Vèn loh phêkte',
+
+# List redirects
+'listredirects' => 'Hruailuhna phêkte',
+
+# Unused templates
+'unusedtemplates' => 'Siamsa hman lohte',
+'unusedtemplateswlh' => 'zawmna dang',
+
 # Random page
 'randompage' => 'Phêk kahpah',
+'randompage-nopages' => "{{PLURAL:$2|Hë hminghmunah hian|Hê'ng hminghmunahte hian}} phêk pakhat mah a awm lo: $1.",
+
+# Random redirect
+'randomredirect' => 'Hruailuhna kahpah',
+'randomredirect-nopages' => '"$1" hminghmunah hian hruailuhna phêk pakhat mah a awm lo.',
 
 # Statistics
 'statistics' => 'Lepsena',
+'statistics-header-pages' => 'Phêk lepsena',
+'statistics-header-edits' => 'Siamṭhatphung lepsena',
+'statistics-header-views' => 'Tlawhna lepsèna',
+'statistics-header-users' => 'Hmangtute chanchin kimchang',
+'statistics-header-hooks' => 'Chanchin dang',
+'statistics-articles' => 'Thuziakna phêkte',
 'statistics-pages' => 'Phekte',
-
+'statistics-pages-desc' => 'Hë wiki-a phêk awm zawng zawng, sawihona phêk, hruailuhna phêk ladt. tel vekin.',
+'statistics-files' => 'Taksa hlankaite',
+'statistics-edits' => '{{SITENAME}} din achina phêk khawih danglam zât',
+'statistics-edits-average' => 'Phêk khat zëla siamṭhat zât chawhrual',
+'statistics-views-total' => 'Tlawh zât',
+'statistics-views-total-desc' => 'Phêk awm lo leh phêk vohbîkte tlawhna chu chhiar tel a ni lo',
+'statistics-views-peredit' => 'Siamṭhat pakhat zël tlawh zât',
+'statistics-users' => '[[Special:ListUsers|Hmangtu]] inziaklût zât',
+'statistics-users-active' => 'Hmangtu aktif zât',
+'statistics-users-active-desc' => 'Ni {{PLURAL:$1|khat|$1}} kaltâ chhunga thiltih nei hmangtuho',
+'statistics-mostpopular' => 'Phêk thlir zin deuh deuhte',
+
+'disambiguations' => 'Thliarfelna phêk zawmtu phêkte',
 'disambiguationspage' => 'Template:thliar',
 
+'doubleredirects' => 'Hruailuhna phír',
+'double-redirect-fixed-move' => '[[$1]] sawn a ni ta.
+[[$2]] lama hruailuhna siam nghâl a ni.',
+'double-redirect-fixed-maintenance' => '[[$1]] aṭanga [[$2]] hruailuhna phír chinfel.',
+'double-redirect-fixer' => 'Hruailuhna chingfeltu',
+
+'brokenredirects' => 'Hruailuhna kehchhia',
+'brokenredirectstext' => 'Ahnuaia hruailuhnate hian phêk awm lova hruailuh an tum:',
 'brokenredirects-edit' => 'siamţhatna',
 'brokenredirects-delete' => 'paihna',
 
@@ -1089,16 +1191,57 @@ A hming thlâk la bei ţha leh rawh.',
 
 # Miscellaneous special pages
 'nbytes' => 'Bait {{PLURAL:$1||}} $1',
-'nmembers' => 'Tel (a chhunga awm) {{PLURAL:$1||$1}}',
+'nmembers' => 'A chhungah  {{PLURAL:$1||$1}} a awm.',
+'nrevisions' => 'siamṭhatna $1 {{PLURAL:$1||}}',
+'nviews' => 'vawi $1 {{PLURAL:$1||}} ràwn a ni tawh.',
+'nimagelinks' => 'Phêk $1-ah {{PLURAL:$1||}} hman a ni.',
+'ntransclusions' => 'phêk $1-ah {{PLURAL:$1||}} hman a ni.',
+'specialpage-empty' => 'Thuhawn a awm lo tlat.',
+'lonelypages' => 'Phêk fahrahte',
+'uncategorizedpages' => 'Páwl nei lo phêkte',
+'uncategorizedcategories' => 'Páwl nei lo páwlte',
+'uncategorizedimages' => 'Páwl nei lo taksate',
+'uncategorizedtemplates' => 'Páwl nei lo siamsâte',
+'unusedcategories' => 'Páwl hman lohte',
+'unusedimages' => 'Taksa hman hlawh lote',
 'popularpages' => 'Phêk lärte',
-'prefixindex' => 'Hmabet nei phek zawng zawng',
+'wantedcategories' => 'Páwl mamawhte',
+'wantedpages' => 'Phêk mamawhte',
+'wantedpages-badtitle' => 'Phêk hming dik lo: $1',
+'wantedfiles' => 'Taksa mamawhte',
+'wantedtemplates' => 'Siamsa mamawhte',
+'mostlinked' => 'Phêk zawm hlawh berte',
+'mostlinkedcategories' => 'Pawl zawm hlawh berte',
+'mostlinkedtemplates' => 'Siamsa hman hlawh berte',
+'mostcategories' => 'Telna páwl ngah ber phêkte',
+'mostimages' => 'Taksa hman hlawh berte',
+'mostrevisions' => 'Phêk siam danglam zin berte',
+'prefixindex' => 'Hemi hmabet nei phek zawng zawng',
+'prefixindex-namespace' => 'Hemi ($1 hminghmun) hmabeta neih phêk zawng zawngte',
+'shortpages' => 'Phêk täwite',
+'longpages' => 'Phêk seite',
+'deadendpages' => 'Phêk ralthümte',
+'deadendpagestext' => 'A hnuaia phêkte hian {{SITENAME}}-a phêk dang pakhat mah zawmpui an nei lo.',
+'protectedpages' => 'Phêk vènhimte',
+'protectedpages-indef' => 'Phêk vènhim kumhlunho chauh',
+'protectedpagestext' => 'A hnuaia phêkte hi sawn emaw siam danglam theih loh tùra vènhim an ni',
+'protectedtitles' => 'Hming vènhimte',
+'listusers' => 'Hmangtu tlarna',
+'listusers-editsonly' => 'Siam danglam nei hmangtu chauh pholang rawh',
+'listusers-creationsort' => 'Siam ni indawtin tlar rawh',
+'usereditcount' => 'Siam danglam {{PLURAL:||}} $1',
 'usercreated' => '{{GENDER:$3|}} Ni $1, dar $2-a siam',
 'newpages' => 'Phek tharte',
 'newpages-username' => 'Hmangtu hming:',
 'ancientpages' => 'Phek hluiho',
 'move' => 'Sawnna',
+'movethispage' => 'Hë phêk hi sawn rawh',
+'notargettitle' => 'Tumhmun nei lo',
+'nopagetitle' => 'Hetiang tumhmun phêk hi a awm lo',
+'nopagetext' => 'I tumhmun sawi kher kha a awm lo niin a lang.',
 'pager-newer-n' => '{{PLURAL:$1|thar zawk 1|thar zawk $1}}',
 'pager-older-n' => '{{PLURAL:$1|hlui 1|hlui $1}}',
+'suppress' => 'Hmuh hmaih',
 
 # Book sources
 'booksources' => 'Lehkhabu rawnte',
@@ -1106,13 +1249,19 @@ A hming thlâk la bei ţha leh rawh.',
 'booksources-go' => 'Kal rawh le',
 
 # Special:Log
+'specialloguserlabel' => 'Buatsaihtu:',
+'speciallogtitlelabel' => 'Tumhmun (hming emaw hmangtu):',
 'log' => 'Chanchin-ziak',
+'all-logs-page' => 'Chanchin-ziak vàntlang thilte:',
+'log-title-wildcard' => 'Hë thüa inṭan hmingte hi zawng rawh',
 
 # Special:AllPages
 'allpages' => 'Phek zawng zawngte',
-'alphaindexline' => '$1 aţanga $2',
+'alphaindexline' => '$1 aanga $2',
 'nextpage' => 'Phek dawt ($1)',
 'prevpage' => 'Phêk hmasa ($1)',
+'allpagesfrom' => 'Hemi aṭanga inṭan hian pholang rawh:',
+'allpagesto' => 'Hemi chin thleng hian:',
 'allarticles' => 'Phek zawng zawngte',
 'allinnamespace' => 'Phêk zawng zawng (hminghmun $1-a mi)',
 'allnotinnamespace' => 'Phêk zawng zawng (hminghmun $1-a awm lo)',
@@ -1122,24 +1271,58 @@ A hming thlâk la bei ţha leh rawh.',
 'allpagesprefix' => 'Hemi thuhmabeta neih zawng hi pholang rawh:',
 'allpagesbadtitle' => 'Phêk hming dik lo emaw ţawng dang/wiki dang thuhmabet a hmang palh a nih hmel.
 Phêk hminga hman awih loh hawrawp a hmang palh a ni mai thei bawk.',
+'allpages-bad-ns' => '{{SITENAME}} hian "$1" tih hminghmun a nei lo.',
+'allpages-hide-redirects' => 'Hruailuhna phêkho thup rawh',
+
+# SpecialCachedPage
+'cachedspecial-refresh-now' => 'A thar ber thlirna.',
 
 # Special:Categories
 'categories' => 'Pawlte',
+'categoriespagetext' => 'A hnuaia pawl{{PLURAL:$1||te}} hian phêk emaw media a{{PLURAL:$1||n}} nei.
+Hetah hian [[Special:UnusedCategories|pawl hman lohho]] pholan tel a ni lo.
+[[Special:WantedCategories|Pawl mamawhho]] en bawk la.',
+'categoriesfrom' => 'Hemi-a inṭan pawlho hi pholang rawh:',
+'special-categories-sort-count' => 'a chhúnga thil awm zât azirin thliar rawh',
 'special-categories-sort-abc' => 'a-aw-b indawtin',
 
 # Special:DeletedContributions
+'deletedcontributions' => 'Hmangtu kutthawhna paihbo tawhte',
+'deletedcontributions-title' => 'Hmangtu kutthawhna paihbo tawhte',
 'sp-deletedcontributions-contribs' => 'kutthawhnate',
 
 # Special:LinkSearch
+'linksearch' => 'Zawmchhuahna zawnna',
+'linksearch-pat' => 'Thu zawn:',
 'linksearch-ns' => 'Hminghmun:',
-'linksearch-ok' => 'Zawng rawh',
+'linksearch-ok' => 'Zawng rawh le',
 'linksearch-line' => '$1 hi $2 aţanga thlunzawm a ni',
 
+# Special:ListUsers
+'listusersfrom' => 'Hemi-a inṭanin hmangtuho pholang rawh:',
+'listusers-submit' => 'Pholanna',
+'listusers-noresult' => 'Hmangtu an awm lo.',
+'listusers-blocked' => '(danbeh)',
+
+# Special:ActiveUsers
+'activeusers' => 'Hmangtu hlun tlarna',
+'activeusers-hidebots' => 'Khawlmi thupna',
+'activeusers-hidesysops' => 'Roreltu thupna',
+'activeusers-noresult' => 'Hmangtu awm lo.',
+
 # Special:Log/newusers
 'newuserlogpage' => 'Hmangtu siamna chanchin-ziak',
+'newuserlogpagetext' => 'Hei hi hmangtu siangchan siam chhinchhiahna a ni.',
 
 # Special:ListGroupRights
+'listgrouprights' => 'Hmangtu pawl dikna-chanvote',
+'listgrouprights-key' => '* <span class="listgrouprights-granted">Dikna-chanvo phalsak</span>
+* <span class="listgrouprights-revoked">Dikna-chanvo hnuhkirsak</span>',
+'listgrouprights-group' => 'Pawl',
+'listgrouprights-rights' => 'Dikna-chanvo',
+'listgrouprights-helppage' => 'Help:Pawl dikna-chanvo',
 'listgrouprights-members' => '(tel zawng zawng)',
+'listgrouprights-addgroup' => '{{PLURAL:$2|Pawl|Pawl}} belhna: $1',
 
 # E-mail user
 'emailuser' => 'He hmangtu hi e-lehkha thawn rawh',
@@ -1163,8 +1346,8 @@ Phêk hminga hman awih loh hawrawp a hmang palh a ni mai thei bawk.',
 'watchlist' => 'Ka ralvèn',
 'mywatchlist' => 'Ka ralvèn',
 'watchlistfor2' => '$1 tan $2',
-'nowatchlist' => 'I ràlvènah engmah i nei lo.',
-'watchlistanontext' => 'I ralvèn en tùrin emaw siamţha tùrin $1 rawh.',
+'nowatchlist' => 'Rálvèn i nei lo',
+'watchlistanontext' => 'I ralvèn en tùrin emaw siamha tùrin $1 rawh.',
 'watchnologin' => 'I la lût lo',
 'watchnologintext' => 'I ralvèn tidanglam tùrin i [[Special:UserLogin|inziahluh]] a ngai.',
 'addwatch' => 'Ràlvèn zingah telh rawh',
@@ -1175,6 +1358,7 @@ Phêk hminga hman awih loh hawrawp a hmang palh a ni mai thei bawk.',
 'unwatch' => 'Vil tihtawpna',
 'unwatchthispage' => 'Vil tihtawpna',
 'notanarticle' => 'Phêk dikdawh a ni lo.',
+'notvisiblerev' => 'Hmangtu dang tihdanglamna thar paihbo a ni.',
 'watchnochange' => 'I hun sawi chhungah khan i ralvèn khawih buai a ni lo.',
 'watchlist-details' => 'I ralvèn zing aţanga {{PLURAL:$1| phêk $1 |phêk $1}}, sawihona phêk chhiar lohvin.',
 'wlheader-enotif' => '*E-lehkha inhriattirna tihnun a ni.',
@@ -1185,7 +1369,13 @@ Phêk hminga hman awih loh hawrawp a hmang palh a ni mai thei bawk.',
 'wlshowlast' => 'Darkar $1 kalta-a tihdanglam tilang rawh , ni $2 kalta-a tihdanglam tilang rawh, $3 tilang rawh',
 'watchlist-options' => 'Ralvèn duhdàn',
 
+'enotif_anon_editor' => 'hmangtu hriat loh $1',
+
 # Delete
+'deletepage' => 'Hë phêk hi paih rawh',
+'confirm' => 'Tihchianna',
+'excontent' => 'kentel: "$1"',
+'excontentauthor' => 'kentel: "$1" (kutthawhtu awm chhun "[[Special:Contributions/$2|$2]])',
 'actioncomplete' => 'A zo ta',
 'actionfailed' => 'A tlawlh',
 'dellogpage' => 'Nuaibo chhinchhiahna',
@@ -1453,9 +1643,11 @@ Tlar pakhata zawmna hmasa ber chu taksa ţha lo zawmna a ni tùr a ni.
 Chu tlara zawmna dang awm reng reng chu bîk-thil-a ngaih a ni ang; tlar chhunga taksa awmna tùr phek kan tihna a nih chu.',
 
 # Metadata
-'metadata' => 'Nepnawi  (metadata)',
-'metadata-help' => 'He taksa hian hriatna dang a keng tel, thlalakna emaw ami siamna sekrek ilo aţanga lo awm a ni mai thei.
-He taksa hi a tira a nihphung tihdanglam tawh a nih chuan a chanchin ziah khuan a danglam hnu chanchin a huam tel lo mai thei.',
+'metadata' => 'Nepnawi',
+'metadata-help' => 'He taksa hian hriatna dang a keng tel; thlalakna emaw thlachhuina amah siamna sekrek ilo aṭanga lo awm a ni mai thei.
+He taksa hi a tira a nihphung tihdanglam tawh a nih chuan a chanchin ziah khuan a danglam hnu chanchin a hril kim lo mai thei.',
+'metadata-expand' => 'Chanchin kimchang tihlanna',
+'metadata-collapse' => 'Chanchin kimchang thup ṭhenna',
 'metadata-fields' => 'Thlalâk chanchin nepnawi he thuthawna tihlante hi thlalâk phek pholan huna chanchin nepnawi dawhkan thleh a nihin tihlan a ni ang.
 A bak zawng chu thuhrûk sa vek a ni ang.
 * make
@@ -1473,6 +1665,46 @@ A bak zawng chu thuhrûk sa vek a ni ang.
 * gpsaltitude',
 
 # EXIF tags
+'exif-imagewidth' => 'Zàuzáwng',
+'exif-imagelength' => 'Sànzáwng',
+'exif-bitspersample' => 'Péng khata mal(bit) awm zât',
+'exif-compression' => 'Sàwrtêtphung',
+'exif-photometricinterpretation' => 'Rawng inpawlhphung',
+'exif-orientation' => 'Hawizáwng',
+'exif-samplesperpixel' => 'Péng zât',
+'exif-planarconfiguration' => 'Hriatna inremphung',
+'exif-ycbcrsubsampling' => 'Y leh C inthlauhbï',
+'exif-ycbcrpositioning' => 'Y leh C ṭhuthmun',
+'exif-xresolution' => 'Pheizáwnga tihfiahphung',
+'exif-yresolution' => 'Tungzáwnga tihfiahphung',
+'exif-stripoffsets' => 'Thlalâk hriattirna awmna',
+'exif-rowsperstrip' => 'Ṭhuang khata tlar zât',
+'exif-stripbytecounts' => 'Ṭhuang zàwr zìmtina byte awm zât',
+'exif-jpeginterchangeformat' => 'JPEG SOI dahhmun',
+'exif-jpeginterchangeformatlength' => 'JPEG hriattirna lenzawng (Byte-in)',
+'exif-whitepoint' => 'Hmun vár rawng nihphung',
+'exif-primarychromaticities' => 'Rawng bulbälte nihphung',
+'exif-datetime' => 'Taksa tihdanglam hun leh ni',
+'exif-imagedescription' => 'Lem hming',
+'exif-make' => 'Thlalâkna siamtu',
+'exif-model' => 'Thlalâkna sìamphung',
+'exif-software' => 'Khawlthlûak hman',
+'exif-artist' => 'Buatsaihtu',
+'exif-copyright' => 'Phalna kawltu',
+'exif-exifversion' => 'EXIF chhuah',
+'exif-flashpixversion' => 'Flashpix chhuah chhawmdàwl theih',
+'exif-colorspace' => 'Rawng hmun',
+'exif-componentsconfiguration' => 'Péngtinte awmzia',
+'exif-compressedbitsperpixel' => 'Lem sàwrzìmphung',
+'exif-pixelydimension' => 'Lem zauzáwng',
+'exif-pixelxdimension' => 'Lem sànzáwng',
+'exif-usercomment' => 'Hmangtu kamchhuak',
+'exif-relatedsoundfile' => 'Ritaksa laichinte',
+'exif-datetimeoriginal' => 'Hriattirna siamchhuah hun leh ni',
+'exif-datetimedigitized' => 'Tihkhàwl hun leh ní',
+'exif-subsectime' => 'Tihdanglam hun leh ni',
+'exif-exposuretime' => 'Phochhuah hun',
+'exif-fnumber' => 'F zât',
 'exif-source' => 'Hnar:',
 'exif-writer' => 'Ziaktu',
 'exif-languagecode' => 'Ţawng',
index 593d127..469b493 100644 (file)
@@ -10,6 +10,7 @@
  * @author Bombola
  * @author Dato deutschland
  * @author Dawid Deutschland
+ * @author Erdemaslancan
  * @author Ibero-kolxi
  * @author Reedy
  * @author The Evil IP address
@@ -112,7 +113,10 @@ $messages = array(
 
 # Vector skin
 'vector-action-delete' => 'Jili',
+'vector-action-protect' => 'İçvi',
+'vector-view-create' => 'dokʼidi',
 'vector-view-edit' => 'Doktiri',
+'variants' => "Variant'epe",
 
 'errorpagetitle' => 'Çilata',
 'returnto' => '$1 butʼkʼaşa goikti.',
@@ -327,6 +331,7 @@ Oxo3ʼonapape: (a3ʼineri) = a3ʼineri versiyoni kʼala na ren farkʼi,
 'search-interwiki-more' => '(çkva)',
 'search-mwsuggest-enabled' => 'okʼvandupete',
 'search-mwsuggest-disabled' => 'okʼvandu varen',
+'searchall' => 'mteli',
 'nonefound' => "'''Notʼi''': Xvala, namtini svacoxope maartani oqʼopinot igoren.
 Ogoruşi dudis '''all:''' pʼrefiksi okʼatute doloçʼareli na ren iri şeyi (oğarğaluşi butʼkʼape, şablonepe, doçkva şeyepeti iqʼvasen) mgori varna pʼrefiksi oqʼopinot na igoren svacoxo ixmarit.",
 'powersearch' => 'Mordineri ogoru',
@@ -405,7 +410,10 @@ Ogoruşi dudis '''all:''' pʼrefiksi okʼatute doloçʼareli na ren iri şeyi (o
 'uploadlogpage' => 'Dosya oncğonu kʼayitʼepe',
 'uploadedimage' => 'Siteşa na incğonen resimi: "[[$1]]"',
 
+'license-header' => 'Lisans',
+
 # File description page
+'file-anchor-link' => 'Dosya',
 'filehist' => 'Dosyaşi tarixi',
 'filehist-help' => 'Dosyaşi tarixi oz*iru şeni Ndğa/Ora burme-muşis na renan tarixepes o3ʼkʼedi.',
 'filehist-deleteall' => 'mteli jili',
@@ -549,6 +557,7 @@ Am butʼkʼaşi oçvuşi sinori gaktirinen; ama am oktiroba, kʼademoni oçvalu
 
 'sp-contributions-newbies' => 'Xvala ağani maxmarepeşi meşvelape ko3ʼiri',
 'sp-contributions-blocklog' => 'Bloğiş kʼayitʼi',
+'sp-contributions-talk' => 'Mesaji',
 'sp-contributions-search' => 'Meşvelape mgori',
 'sp-contributions-username' => 'IP varna maxmare:',
 'sp-contributions-submit' => 'Mgori',
@@ -616,6 +625,9 @@ Mu iqʼven başka coxo doçʼari.',
 # Export
 'export' => 'Butʼkʼa ikʼayitʼi',
 
+# Namespace 8 related
+'allmessagesname' => 'Coxo',
+
 # Thumbnails
 'thumbnail-more' => 'Didi qʼvi',
 
index f4abaed..1252716 100644 (file)
@@ -17,6 +17,7 @@
  * @author Meno25
  * @author Priyanka.rachna.jha
  * @author Rajesh
+ * @author Reedy
  * @author Umeshberma
  * @author Vinitutpal
  */
@@ -336,7 +337,7 @@ $1',
 अहाँ सार्वत्रिक विभव संकेतक गलत टंकण केने हएब, वा कोनो गलत लिंकक पाछाँ गेल हएब।
 ई {{अन्तर्जाल}} प्रयोक्ता द्वारा प्रयुक्त तंत्रांशमे स्थित कोनो दोषक संकेत सेहो कऽ सकैए।',
 'nosuchspecialpage' => 'एहेन कोनो विशेष पन्ना नै',
-'nospecialpagetext' => '<गाढ़> अहाँ एकटा अमान्य पन्नाक आग्रह केने छी। </गाढ़>
+'nospecialpagetext' => '<strong> अहाँ एकटा अमान्य पन्नाक आग्रह केने छी। </strong>
 मान्य विशेष पन्नाक सूची एतए अछि [[Special:SpecialPages|{{int:specialpages}}]]।',
 
 # General errors
@@ -2739,7 +2740,7 @@ $1',
 'file-info' => 'संचिका आकार: $1, माइम प्रकार: $2',
 'file-info-size' => '$1 × $2 चित्राणु, फाइल आकार: $3, माइम प्रकार: $4',
 'file-info-size-pages' => '$1 × $2 चित्रकण, संचिका आकार : $3, माइम प्रकार: $4, $5 {{PLURAL:$5|पन्ना|पन्ना सभ}}',
-'file-nohires' => '<छोट>ऐसँ बेशी आनन्तर्य उपलब्ध नै अछि।</छोट>',
+'file-nohires' => 'ऐसँ बेशी आनन्तर्य उपलब्ध नै अछि।',
 'svg-long-desc' => 'एस.वी.जी. फाइल, मामूली रूपमे $1 × $2 चित्रकण, फाइलक आकार: $3',
 'show-big-image' => 'पूर्ण आनन्तर्य',
 'show-big-image-preview' => 'ऐ पूर्वदृश्यक आकार: $1.',
index a510c60..2f002b9 100644 (file)
@@ -26,15 +26,15 @@ $messages = array(
 # User preference toggles
 'tog-underline' => 'Liân-kiat oē té-sûn:',
 'tog-hideminor' => 'Am chòe-kīn ê sió kái-piàn',
-'tog-extendwatchlist' => 'Tián-khui kàm-sī-toaⁿ khoàⁿ só͘-ū ê kái-piàn, m̄-chí sī choè-kīn--ê',
-'tog-usenewrc' => 'Ēng ka-kiông pán khoàⁿ chòe-kīn ê kái-piàn (su-iàu JavaScript)',
+'tog-extendwatchlist' => 'Khok-chhiong kàm-sī-toaⁿ kàu hián-sī só͘-ū ê kái-piàn',
+'tog-usenewrc' => 'Ka-kiông pán ê chòe-kīn-ê-kái-piàn (su-iàu JavaScript)',
 'tog-numberheadings' => 'Phiau-tê chū-tōng pian-hō',
 'tog-showtoolbar' => 'Hián-sī pian-chi̍p ke-si-tiâu (su-iàu JavaScript)',
 'tog-editondblclick' => 'Siang-ji̍h ia̍h-bīn to̍h ē-tàng pian-chi̍p (su-iàu JavaScript)',
 'tog-editsection' => 'Ji̍h [siu-kái] chit-ê liân-kiat to̍h ē-tàng pian-chi̍p toāⁿ-lo̍h',
 'tog-editsectiononrightclick' => 'Chiàⁿ-ji̍h (right click) toāⁿ-lo̍h (section) phiau-tê to̍h ē-tàng pian-chi̍p toāⁿ-lo̍h (su-iàu JavaScript)',
 'tog-showtoc' => 'Hián-sī bo̍k-chhù (3-ê phiau-tê í-siōng ê ia̍h)',
-'tog-rememberpassword' => 'Kì tiâu bi̍t-bé, āu-chōa iōng ( $1 {{PLURAL:$1|day|kang}} lāi)',
+'tog-rememberpassword' => 'Kì tiâu bi̍t-bé, āu-chōa iōng (for a maximum of $1 {{PLURAL:$1|day|days}})',
 'tog-watchcreations' => 'Kā goá khui ê ia̍h ka-ji̍p kàm-sī-toaⁿ lāi-té',
 'tog-watchdefault' => 'Kā goá pian-chi̍p kòe ê ia̍h ka-ji̍p kàm-sī-toaⁿ lāi-té',
 'tog-watchmoves' => 'Kā goá soá ê ia̍h ka-ji̍p kàm-sī-toaⁿ',
@@ -44,8 +44,8 @@ $messages = array(
 'tog-previewonfirst' => 'Thâu-pái pian-chi̍p seng khoàⁿ-māi',
 'tog-nocache' => 'Koaiⁿ-tiāu ia̍h ê cache',
 'tog-fancysig' => 'Chhiam-miâ mài chò liân-kiat',
-'tog-externaleditor' => 'Iōng gōa-pō· pian-chi̍p-khì (kan-na hō͘ ko-chhiú, he ài tī lí ê tiān-náu koh siat-tēng. [//www.mediawiki.org/wiki/Manual:External_editors Siông-chêng.])',
-'tog-externaldiff' => 'Iōng gōa-pō· diff (kan-na hō͘ ko-chhiú, he ài tī lí ê tiān-noá koh siat-tēng. [//www.mediawiki.org/wiki/Manual:External_editors Siông-chêng.])',
+'tog-externaleditor' => 'Iōng gōa-pō· pian-chi̍p-khì',
+'tog-externaldiff' => 'Iōng gōa-pō· diff',
 'tog-forceeditsummary' => 'Pian-chi̍p khài-iàu bô thiⁿ ê sî-chūn, kā goá thê-chhéⁿ',
 'tog-watchlisthideown' => 'Kàm-sī-toaⁿ bián hián-sī goá ê pian-chi̍p',
 'tog-watchlisthidebots' => 'Kàm-sī-toaⁿ bián hián-sī ki-khì pian-chi̍p',
@@ -115,7 +115,7 @@ $messages = array(
 'dec' => '12g',
 
 # Categories related messages
-'pagecategories' => '{{PLURAL:$1|Lūi-pia̍t|ê lūi-pia̍t}}',
+'pagecategories' => '{{PLURAL:$1|Lūi-pia̍t|Lūi-pia̍t}}',
 'category_header' => 'Tī "$1" chit ê lūi-pia̍t ê bûn-chiuⁿ',
 'subcategories' => 'Ē-lūi-pia̍t',
 'category-media-header' => 'Tī lūi-pia̍t "$1" ê mûi-thé',
@@ -192,7 +192,7 @@ $messages = array(
 'create-this-page' => 'Khai-sí siá chit ia̍h',
 'delete' => 'Thâi',
 'deletethispage' => 'Thâi chit ia̍h',
-'undelete_short' => 'Kiù {{PLURAL:$1| ê siu-káit|$1  ê siu-kái}}',
+'undelete_short' => 'Kiù $1 ê siu-kái',
 'viewdeleted_short' => 'Khoàⁿ {{PLURAL:$1|chi̍t-ê thâi tiàu--ê pian-chi̍p|$1 ê thâi tiàu--ê pian-chi̍p}}',
 'protect' => 'Pó-hō·',
 'protect_change' => 'kái-piàn',
@@ -221,7 +221,7 @@ $messages = array(
 'redirectedfrom' => '(Tùi $1 choán--lâi)',
 'redirectpagesub' => 'Choán-ia̍h',
 'lastmodifiedat' => 'Chit ia̍h tī $1,  $2 ū kái--koè',
-'viewcount' => 'Pún-ia̍h kàu taⁿ ū {{PLURAL:$1| pái|$1 pái}}  ê sú-iōng.',
+'viewcount' => 'Pún-ia̍h kàu taⁿ ū $1 pái access.',
 'protectedpage' => 'Siū pó-hō͘ ê ia̍h',
 'jumpto' => 'Thiàu khì:',
 'jumptonavigation' => 'Se̍h chām',
@@ -283,7 +283,7 @@ Chhiáⁿ khoàⁿ [[Special:Version|pán-pún ia̍h]].',
 'thisisdeleted' => 'Khoàⁿ a̍h-sī kiù $1?',
 'viewdeleted' => 'Beh khoàⁿ $1?',
 'restorelink' => '{{PLURAL:$1|chi̍t ê thâi-tiàu ê pian-chi̍p|$1 thâi-tiàu ê pian-chi̍p}}',
-'feedlinks' => 'Tēng khoàⁿ:',
+'feedlinks' => 'Chhī-liāu:',
 'feed-invalid' => 'Bô-hāu ê tēng khoàⁿ lūi-hêng.',
 'feed-unavailable' => 'Bô thê-kiong liân-ha̍p tēng khoàⁿ.',
 'site-rss-feed' => '$1 ê RSS tēng khoàⁿ',
@@ -346,11 +346,11 @@ Nā m̄-sī hit chióng chêng-hêng, lí khó-lêng tú tio̍h nńg-thé ê chh
 'unexpected' => 'Koài-koài ê pió-tat: "$1"="$2"。',
 'formerror' => 'Chhò-gō·: bô-hoat-tō· kā pió sàng chhut khì.',
 'badarticleerror' => 'Bē-tàng tiàm chit ia̍h chip-hêng chit ê tōng-chok.',
-'cannotdelete' => 'Bô-hoat-tō· kā  "$1" hit ê ia̍h a̍h-sī iáⁿ-siōng thâi tiāu. (Khó-lêng pa̍t-lâng í-keng kā thâi tiāu ah.)',
+'cannotdelete' => 'Bô-hoat-tō· kā hit ê ia̍h a̍h-sī iáⁿ-siōng thâi tiāu. (Khó-lêng pa̍t-lâng í-keng kā thâi tiāu ah.)',
 'badtitle' => 'M̄-chiâⁿ piau-tê',
 'badtitletext' => 'Iau-kiû ê piau-tê sī bô-hāu ê, khang ê, a̍h-sī liân-kiat chhò-gō· ê inter-language/inter-wiki piau-tê.',
-'perfcached' => 'Ē-kha ê chu-liāu ùi khoài-chhú(cache) lâi--ê, só·-í khó-lêng m̄-sī siōng sin ê. Khoài-chhú lāi-té siōng chē khǹg {{PLURAL:$1| chi̍t tiâu|$1 tiâu}}.',
-'perfcachedts' => 'Ē-kha ê chu-liāu ùi khoài-chhú(cache) lâi--ê, tī $1 keng-sin--koè. Khoài-chhú lāi-té siōng chē khǹg {{PLURAL:$4| chi̍t tiâu |$4 tiâu}}.',
+'perfcached' => 'Ē-kha ê chu-liāu tùi lâi--ê, só·-í bī-pit oân-choân hoán-èng siōng sin ê chōng-hóng. A maximum of {{PLURAL:$1|one result is|$1 results are}} available in the cache.',
+'perfcachedts' => 'Ē-kha ê chu-liāu tùi lâi--ê, tī $1 keng-sin--koè. A maximum of {{PLURAL:$4|one result is|$4 results are}} available in the cache.',
 'querypage-no-updates' => 'Chit-má bē-sái kái chit ia̍h.
 Chia ê chu-liāu bē-tàng sui tiông-sin chéng-lí.',
 'wrong_wfQuery_params' => 'Chhò-ngō͘ ê chham-sò͘ chhoân hō͘ wfQuery()<br />
@@ -363,9 +363,7 @@ Chhiáⁿ tī kúi hun-cheng hāu chiah koh chhì.',
 'protectedpagetext' => 'Chit ia̍h hông só tiâu leh, bē pian-chi̍p tit.',
 'viewsourcetext' => 'Lí ē-sái khoàⁿ ia̍h khó͘-pih chit ia̍h ê goân-sú loē-iông:',
 'protectedinterface' => 'Chit ia̍h thê-kiong nńg-thé kài-bīn ēng ê bûn-jī. Ūi beh ī-hông lâng chau-that, só͘-í ū siū tio̍h pó-hō͘.',
-'editinginterface' => "'''Sè-jī:''' Lí tng teh siu-kái 1 bīn thê-kiong nńg-thé kài-bīn bûn-jī ê ia̍h.
-Jīn-hô kái-piàn to ē éng-hióng tio̍h kî-thaⁿ iōng-chiá ê sú-iōng kài-bīn.
-Nā ūi-tio̍h hoan-e̍k, chhiáⁿ khó-lū sú-iōng [//translatewiki.net/wiki/Main_Page?setlang=nan translatewiki.net], MediaWiki ê chāi-tē hoà sū-kang.",
+'editinginterface' => "'''Sè-jī:''' Lí tng teh siu-kái 1 bīn thê-kiong nńg-thé kài-bīn bûn-jī ê ia̍h. Jīn-hô kái-piàn to ē éng-hióng tio̍h kî-thaⁿ iōng-chiá ê sú-iōng kài-bīn.",
 'sqlhidden' => '(Tshàng SQL tsa-sûn)',
 'cascadeprotected' => 'Chit-ê ia̍h í-keng hông pó-hō͘ bē kái tit. In-ūi i tī ē-bīn {{PLURAL:$1|ê|ê}} liân-só pó-hō͘ lāi-té:
 $2',
@@ -377,14 +375,14 @@ $2',
 # Login and logout pages
 'logouttext' => "'''Lí í-keng teng-chhut.'''
 
-Lí ē-sái mài kì-miâ kè-siok sú-iōng {{SITENAME}}, mā ē-sái iōng kāng-ê a̍h-sī  pa̍t-ê sin-hūn [[Special:UserLogin|têng teng-ji̍p]].
+Lí ē-sái mài kì-miâ kè-siok sú-iōng {{SITENAME}}, mā ē-sái iōng kāng-ê a̍h-sī pa̍t-ê sin-hūn têng teng-ji̍p.
 Chhiaⁿ chù-ì: ū-kóa ia̍h ū khó-lêng khoàⁿ-tio̍h bē-su lí iû-goân teng-ji̍p tiong; che chi-iàu piàⁿ tiāu lí ê browser ê cache chiū ē chèng-siông.",
 'welcomecreation' => '==Hoan-gêng $1!==
-Í-keng khui hó lí ê kháu-chō.  M̄-hó bē-kì-tit chhiâu lí tī [[Special:Preferences|{{SITENAME}} ê iōng-chiá siat-tēng]].',
+Í-keng khui hó lí ê kháu-chō.  M̄-hó bē-kì-tit chhiâu lí ê iōng-chiá siat-tēng.',
 'yourname' => 'Lí ê iōng-chiá miâ-chheng:',
 'yourpassword' => 'Lí ê bi̍t-bé:',
 'yourpasswordagain' => 'Têng phah bi̍t-bé:',
-'remembermypassword' => 'Kì tiâu góa ê bi̍t-bé (āu-chhiú teng-ji̍p iōng) (tī $1 {{PLURAL:$1|day|days}} kang lāi)',
+'remembermypassword' => 'Kì tiâu góa ê bi̍t-bé (āu-chhiú teng-ji̍p iōng) (for a maximum of $1 {{PLURAL:$1|day|days}})',
 'login' => 'Teng-ji̍p',
 'nav-login-createaccount' => 'Teng-ji̍p / khui sin kháu-chō',
 'loginprompt' => 'Thiⁿ ē-kha ê chu-liāu thang khui sin hō·-thâu a̍h-sī teng-ji̍p {{SITENAME}}.',
@@ -392,7 +390,7 @@ Chhiaⁿ chù-ì: ū-kóa ia̍h ū khó-lêng khoàⁿ-tio̍h bē-su lí iû-go
 'logout' => 'Teng-chhut',
 'userlogout' => 'Teng-chhut',
 'notloggedin' => 'Bô teng-ji̍p',
-'nologin' => "Bô poàⁿ ê kháu-chō? '''$1'''.",
+'nologin' => "Bô-thang teng-ji̍p? '''$1'''.",
 'nologinlink' => 'Khui 1 ê kháu-chō',
 'createaccount' => 'Khui sin kháu-chō',
 'gotaccount' => "Í-keng ū kháu-chō? '''$1'''.",
@@ -404,7 +402,7 @@ Chhiaⁿ chù-ì: ū-kóa ia̍h ū khó-lêng khoàⁿ-tio̍h bē-su lí iû-go
 'createaccounterror' => 'Bô hoat-tō͘ khui kháu-chō: $1',
 'loginsuccesstitle' => 'Teng-ji̍p sêng-kong',
 'loginsuccess' => 'Lí hiān-chhú-sî í-keng teng-ji̍p {{SITENAME}} chò "$1".',
-'nosuchuser' => 'Chia bô iōng-chiá hō-chò "$1". Miâ-jī  ū hun toā-siá, sio-siá . Chhiáⁿ kiám-cha lí ê phèng-im, a̍h-sī [[Special:UserLogin/signup|khui sin káu-chō]].',
+'nosuchuser' => 'Chia bô iōng-chiá hō-chò "$1". Chhiáⁿ kiám-cha lí ê phèng-im, a̍h-sī iōng ē-kha ê pió lâi khui sin iōng-chiá ê kháu-chō.',
 'nosuchusershort' => 'Bô "$1" chit ê iōng-chiá miâ.
 Tùi khoàⁿ-māi,  lí phah--ê.',
 'nouserspecified' => 'Lí ài chí-tēng chi̍t ê iōng-chiá miâ.',
@@ -415,9 +413,8 @@ Tùi khoàⁿ-māi,  lí phah--ê.',
 'noemail' => 'Kì-lo̍k bô iōng-chiá "$1" ê e-mail chū-chí.',
 'passwordsent' => 'Ū kià sin bi̍t-bé khì "$1" chù-chheh ê e-mail chū-chí. Siu--tio̍h liáu-āu chhiáⁿ têng teng-ji̍p.',
 'mailerror' => 'Kià phoe tú tio̍h chhò-gō·: $1',
-'acct_creation_throttle_hit' => 'Tī koè-khì 24 tiám-cheng lāi,  ū chit ê iōng lí IP bāng-chí ê lâng í-keng khui {{PLURAL:$1|1 account|$1 kháu-chō}}. He sī hit ê sî-kan lāi thang chò ê.
-Tiō-sī kóng, tī chit-má iōng chit ê IP bāng-chí ê lâng bē-sái koh khui jīm-hô kháu-chō.',
-'emailauthenticated' => 'Lí ê e-mail chū-chí tī $2 $3 khak-jīn sêng-kong.',
+'acct_creation_throttle_hit' => 'Pháiⁿ-sè, lí taⁿ í-keng khui $1 ê kháu-chō ā. Bē-sái koh-chài khui.',
+'emailauthenticated' => 'Lí ê e-mail chū-chí tī $1 khak-jīn sêng-kong.',
 'emailnotauthenticated' => 'Lí ê e-mail chū-chí iáu-bōe khak-jīn ū-hāu, só·-í ē--kha ê e-mail kong-lêng bē-ēng-tit.',
 'noemailprefs' => 'Tī lí ê siat-piān chí-tēng chi̍t ê tiān-chú-phoe tē-chí thang hō͘ chia ê kong-lêng ē-tàng ēng.',
 'emailconfirmlink' => 'Chhiáⁿ khak-jīn lí ê e-mail chū-chí ū-hāu',
@@ -485,26 +482,21 @@ Lîm-sî ê bi̍t-bé: $2',
 'loginreqlink' => 'Teng-ji̍p',
 'loginreqpagetext' => 'Lí ài $1 chiah thang khoàⁿ pat ia̍h.',
 'accmailtitle' => 'Bi̍t-bé kià chhut khì ah.',
-'accmailtext' => "Hō͘ [[User talk:$1|$1]] ê chi̍t ê iōng loān-sò͘ sán-seng ê bi̍t-bé í-keng kìa khì $2.
-
-Kháu-chō ê sin bi̍t-bé thang tī teng-ji̍p liáu tī ''[[Special:ChangePassword|siu-kái bi̍t-bé]]'' ia̍h kái tiāu.",
+'accmailtext' => '$1 ê bi̍t-bé í-keng kìa khì $2.',
 'newarticle' => '(Sin)',
 'newarticletext' => "Lí tòe 1 ê liân-kiat lâi kàu 1 bīn iáu-bōe chûn-chāi ê ia̍h. Beh khai-sí pian-chi̍p chit ia̍h, chhiáⁿ tī ē-kha ê bûn-jī keh-á lāi-té phah-jī. ([[{{MediaWiki:Helppage}}|Bo̍k-lio̍k]] kà lí án-choáⁿ chìn-hêng.) Ká-sú lí bô-tiuⁿ-tî lâi kàu chia, ē-sai chhi̍h liû-lám-khì ê '''téng-1-ia̍h''' tńg--khì.",
-'anontalkpagetext' => "''Pún thó-lūn-ia̍h bô kò·-tēng ê kháu-chō/hō·-thâu, kan-na ū 1 ê IP chū-chí (chhin-chhiūⁿ 123.456.789.123). In-ūi bô kāng lâng tī bô kāng sî-chūn ū khó-lêng tú-hó kong-ke kāng-ê IP, lâu tī chia ê oē ū khó-lêng hō· bô kāng lâng ê! Beh pī-bián chit khoán būn-tê, ē-sái khì [[Special:UserLogin/signup|khui 1 ê hō·-thâu a̍h-sī teng-ji̍p]].''",
-'clearyourcache' => "'''Chù-ì:''' Pó-chûn liáu-āu, tio̍h ē-kì leh kā liû-lám-khì ê cache piàⁿ tiāu chiah khoàⁿ-ē-tio̍h kái-piàn.
-*'''Firefox / Safari:''' chhi̍h tiâu \"Shift\" kâng-sî-chūn tiám-kik ''Reload/têng-sin chài-ji̍p'' a̍h-sī chhi̍h ''Ctrl-F5'' \"Ctrl-R\" kî-tiong chi̍t ê (''⌘-R'' tī Mac)
-* '''Google Chrome:''' chhi̍h ''Ctrl-Shift-R'' (''⌘-R-Shift-R'' tī Mac)
-'''Internet Explorer :'''chhi̍h tiâu \"Ctrl\" kâng-sî-chūn tiám-kek ''Refresh/têng-sin chài-ji̍p'' a̍h-sī chhi̍h \"Ctrl-F5\"
+'anontalkpagetext' => "----''Pún thó-lūn-ia̍h bô kò·-tēng ê kháu-chō/hō·-thâu, kan-na ū 1 ê IP chū-chí (chhin-chhiūⁿ 123.456.789.123). In-ūi bô kāng lâng tī bô kāng sî-chūn ū khó-lêng tú-hó kong-ke kāng-ê IP, lâu tī chia ê oē ū khó-lêng hō· bô kāng lâng ê! Beh pī-bián chit khoán būn-tê, ē-sái khì [[Special:UserLogin|khui 1 ê hō·-thâu a̍h-sī teng-ji̍p]].''",
+'clearyourcache' => "'''Chù-ì:''' Pó-chûn liáu-āu, tio̍h ē-kì leh kā liû-lám-khì ê cache piàⁿ tiāu chiah khoàⁿ-ē-tio̍h kái-piàn: *'''Firefox / Safari:''' chhi̍h tiâu \"Shift\" kâng-sî-chūn tiám-kik ''Reload/têng-sin chài-ji̍p'' a̍h-sī chhi̍h ''Ctrl-F5'' \"Ctrl-R\" kî-tiong chi̍t ê (''Command-R'' tī Mac) 
+* '''Google Chrome:''' chhi̍h ''Ctrl-Shift-R'' (''Command-Shift-R'' tī Mac)
+'''Internet Explorer :'''chhi̍h tiâu \"Ctrl\" kâng-sî-chūn tiám-kek ''Refresh/têng-sin chài-ji̍p'' a̍h-sī chhi̍h \"Ctrl-F5\" 
 * '''Konqueror:'''  tiám-kek ''Reload/têng-sin chài-ji̍p'' a̍h-sī chhi̍h ''F5''
 * '''Opera:''' piàⁿ-tiāu cache tī ''Tools(ke-si) → Preferences(siat-piān)''",
-'usercssyoucanpreview' => "'''Phiat-pō·''': Pó-chûn chìn-chêng ē-sái chhi̍h 'Seng khoàⁿ-māi' kiám-cha sin ê CSS.",
-'userjsyoucanpreview' => "'''Phiat-pō·''': Pó-chûn chìn-chêng ē-sái tiám-kek \"{{int:showpreview}}\" ; chhì lí ê sin JavaScript.",
-'usercsspreview' => "'''Thê-chhíⁿ lí,  che chí-sī sian khoàⁿ-māi  lí ê su-jîn CSS'''
-'''Che iáu-bōe pó-chûn--khí-lâi !'''",
+'usercssyoucanpreview' => "'''Phiat-pō·''': Pó-chûn chìn-chêng ē-sái chhi̍h 'Seng khoàⁿ-māi' kiám-cha sin ê CSS a̍h-sī JavaScript.",
+'userjsyoucanpreview' => "'''Phiat-pō·''': Pó-chûn chìn-chêng ē-sái chhi̍h 'Seng khoàⁿ-māi' kiám-cha sin ê CSS a̍h-sī JavaScript.",
+'usercsspreview' => "'''Sè-jī! Lí hiān-chú-sî khoàⁿ--ê sī lí ê su-jîn css ê preview; che iáu-bōe pó-chûn--khí-lâi!'''",
 'userjspreview' => "'''Sè-jī! Lí hiān-chú-sî chhì khoàⁿ--ê sī lí ka-kī ê javascript; che iáu-bōe pó-chûn--khí-lâi!'''",
 'note' => "'''Chù-ì:'''",
-'previewnote' => "'''Thê-chhéⁿ lí, che chí-sī  hō͘ lí sian khoàⁿ chi̍t-ē.'''
-Lí kái--ê iáu-bōe pó-chûn--khí-lâi !",
+'previewnote' => "'''Thê-chhéⁿ lí che sī 1 bīn kiám-cha chho͘-phe ēng--ê \"seng-khoàⁿ-ia̍h\", iáu-bōe pó-chûn--khí-lâi!'''",
 'session_fail_preview' => "'''Pháiⁿ-sè! Gún chiām-sî bô hoat-tō͘ chhú-lí lí ê pian-chi̍p (goân-in: \"phàng-kiàn sú-iōng kî-kan ê chu-liāu\"). Lô-hoân têng chhì khoàⁿ-māi. Ká-sú iû-goân bô-hāu, ē-sái teng-chhut koh-chài teng-ji̍p hoān-sè tō ē-tit kái-koat.'''",
 'editing' => 'Siu-kái $1',
 'editingsection' => 'Pian-chi̍p $1 (section)',
@@ -518,22 +510,16 @@ Lí ê kái-piàn tī ē-kha ê bûn-jī-keh. Lí su-iàu chiōng lí chò ê k
 'storedversion' => 'Chu-liāu-khò· ê pán-pún',
 'editingold' => "'''KÉNG-KÒ: Lí tng teh siu-kái chit ia̍h ê 1 ê kū siu-tēng-pún. Lí nā kā pó-chûn khí lâi, chit ê siu-tēng-pún sòa-āu ê jīm-hô kái-piàn ē bô khì.'''",
 'yourdiff' => 'Chha-pia̍t',
-'readonlywarning' => "'''CHÙ-Ì: Chu-liāu-khò· taⁿ só tiâu leh thang pān î-siu khang-khòe, só·-í lí hiān-chú-sî bô thang pó-chûn jīn-hô phian-chi̍p hāng-bo̍k. Lí ē-sái kā siong-koan pō·-hūn tah--ji̍p-khì 1-ê bûn-jī tóng-àn pó-chûn, āu-chhiú chiah koh kè-sio̍k.'''
-
-Kā só tiâu ê koán-lí-goân ū lâu oē: $1",
-'protectedpagewarning' => "'''KÉNG-KÒ: Pún ia̍h só tiâu leh. Kan-taⁿ ū hêng-chèng te̍k-koân ê iōng-chiá (sysop) ē-sái siu-kái.'''
-Ē-kha ū choè-kīn ê kì-lo̍k thang chham-khó:",
-'templatesused' => 'Chit ia̍h iōng {{PLURAL:$1|Template|Templates}} chia ê pang-bô· :',
-'templatesusedpreview' => 'Chit ê preview iōng chia ê {{PLURAL:$1|Template|pang-bô͘}}',
-'templatesusedsection' => 'Chit ê toāⁿ-lo̍k iōng chia ê {{PLURAL:$1|Template|pang-bô͘}}',
+'readonlywarning' => "'''CHÙ-Ì: Chu-liāu-khò· taⁿ só tiâu leh thang pān î-siu khang-khòe, só·-í lí hiān-chú-sî bô thang pó-chûn jīn-hô phian-chi̍p hāng-bo̍k. Lí ē-sái kā siong-koan pō·-hūn tah--ji̍p-khì 1-ê bûn-jī tóng-àn pó-chûn, āu-chhiú chiah koh kè-sio̍k.'''",
+'protectedpagewarning' => "'''KÉNG-KÒ: Pún ia̍h só tiâu leh. Kan-taⁿ ū hêng-chèng te̍k-koân ê iōng-chiá (sysop) ē-sái siu-kái.'''",
+'templatesused' => 'Chit ia̍h iōng chia ê pang-bô·:',
+'templatesusedpreview' => 'Chit ê preview iōng chia ê pang-bô͘:',
+'templatesusedsection' => 'Chit ê section iōng chia ê pang-bô͘:',
 'template-protected' => '(pó-hō͘)',
 'template-semiprotected' => '(poàⁿ pó-hō͘)',
 'permissionserrorstext-withaction' => 'Lí bô ún-chún chò $2, in-ūi ē-kha
 {{PLURAL:$1|iân-kò͘|iân-kò͘}}:',
-'recreate-moveddeleted-warn' => "'''Sè-jī: Lí taⁿ chún-pī beh khui ê ia̍h, chêng bat hō͘ lâng thâi tiāu koè.'''
-
-Lí tio̍h chim-chiok soà-chiap pian-chi̍p chit ia̍h ê pit-iàu-sèng.
-Chia ū chit ia̍h ê san-tû kì-lo̍k hō͘ lí chham-khó:",
+'recreate-moveddeleted-warn' => "'''Sè-jī: Lí taⁿ chún-pī beh khui ê ia̍h, chêng bat hō͘ lâng thâi tiāu koè.''' Lí tio̍h chim-chiok soà-chiap pian-chi̍p chit ia̍h ê pit-iàu-sèng. Chia ū chit ia̍h ê san-tû kì-lo̍k (deletion log) hō͘ lí chham-khó:",
 'edit-conflict' => 'Siu-kái sio-chhiong',
 'defaultmessagetext' => 'Siat piān ê bûn-jī',
 
@@ -589,8 +575,8 @@ Chia ū chit ia̍h ê san-tû kì-lo̍k hō͘ lí chham-khó:",
 'searchprofile-images-tooltip' => 'Chhoé tóng-àn',
 'search-section' => '(toān-lo̍h $1)',
 'searchall' => 'choân-pō·',
-'showingresults' => "Ē-kha tùi #'''$2''' khai-sí hián-sī {{PLURAL:$1| hāng| hāng}} kiat-kó.",
-'showingresultsnum' => "Ē-kha tùi #'''$2''' khai-sí hián-sī {{PLURAL:$3| hāng| hāng}} kiat-kó.",
+'showingresults' => 'Ē-kha tùi #<b>$2</b> khai-sí hián-sī <b>$1</b> hāng kiat-kó.',
+'showingresultsnum' => 'Ē-kha tùi #<b>$2</b> khai-sí hián-sī <b>$3</b> hāng kiat-kó.',
 'powersearch' => 'Kiám-sek',
 'powersearch-legend' => 'Kiám-sek',
 
@@ -601,7 +587,7 @@ Chia ū chit ia̍h ê san-tû kì-lo̍k hō͘ lí chham-khó:",
 'preferences' => 'Siat-tēng',
 'mypreferences' => 'Góa ê siat-tēng',
 'prefsnologin' => 'Bô teng-ji̍p',
-'prefsnologintext' => 'Lí it-tēng ài <span class="plainlinks">[{{fullurl:{{#Special:UserLogin}}|returnto=$1}} teng-ji̍p]</span> chiah ē-tàng chhiâu iōng-chiá ê siat-tēng.',
+'prefsnologintext' => 'Lí it-tēng ài [[Special:UserLogin|teng-ji̍p]] chiah ē-tàng chhiâu iōng-chiá ê siat-tēng.',
 'changepassword' => 'Oāⁿ bi̍t-bé',
 'prefs-skin' => 'Phôe',
 'skin-preview' => 'Chhì khoàⁿ',
@@ -622,12 +608,12 @@ Chia ū chit ia̍h ê san-tû kì-lo̍k hō͘ lí chham-khó:",
 'resultsperpage' => '1 ia̍h hián-sī kúi kiāⁿ:',
 'recentchangesdays' => 'Hián-sī kúi ji̍t chòe-kīn ê kái-piàn:',
 'recentchangesdays-max' => 'siōng-choē $1 {{PLURAL:$1|kang|kang}}',
-'recentchangescount' => 'Beh hián-sī kúi tiâu chòe-kīn kái--ê:',
+'recentchangescount' => 'Hián-sī kúi tiâu chòe-kīn ê kái-piàn:',
 'savedprefs' => 'Lí ê iōng-chiá siat-tēng í-keng pó-chûn khí lâi ah.',
 'timezonelegend' => 'Sî-khu',
-'localtime' => 'Chāi-tē sî-kan sī:',
-'timezoneoffset' => 'Sî-chha¹:',
-'servertime' => 'Server sî-kan hiān-chāi sī:',
+'localtime' => 'Chāi-tē sî-kan sī',
+'timezoneoffset' => 'Sî-chha¹',
+'servertime' => 'Server sî-kan hiān-chāi sī',
 'guesstimezone' => 'Tùi liû-lám-khì chhau--lâi',
 'allowemail' => 'Ún-chún pa̍t-ê iōng-chiá kià email kòe-lâi',
 'defaultns' => 'Tī chiah ê miâ-khong-kan chhiau-chhōe:',
@@ -695,7 +681,7 @@ Tī pat-lâng liân-lo̍k lí ê sî-chūn bē kā e-mail tsū-tsí siá chhut--
 'uploaddisabled' => 'Pháiⁿ-sè, sàng chiūⁿ-bāng ê kong-lêng bô khui.',
 'sourcefilename' => 'Tóng-àn goân miâ:',
 'destfilename' => 'Tóng-àn sin miâ:',
-'watchthisupload' => 'Kàm-sī chit ê tóng-àn',
+'watchthisupload' => 'Kàm-sī chit ia̍h',
 'upload-success-subj' => 'Sàng-chiūⁿ-bāng sêng-kong',
 
 # File backend
@@ -718,8 +704,8 @@ Tī pat-lâng liân-lo̍k lí ê sî-chūn bē kā e-mail tsū-tsí siá chhut--
 'filehist' => 'Tóng-àn ê le̍k-sú',
 'filehist-current' => 'hiān-chāi',
 'filehist-datetime' => 'Ji̍t-kî/ Sî-kan',
-'imagelinks' => 'Ēng tio̍h ê  tóng-àn',
-'linkstoimage' => 'Ē-bīn ê {{PLURAL:$1|ia̍h liân kàu|$1 ia̍h liân kàu}}  chit ê tóng-àn:',
+'imagelinks' => 'Iáⁿ-siōng liân-kiat',
+'linkstoimage' => 'Í-hā ê ia̍h liân kàu chit ê iáⁿ-siōng:',
 'nolinkstoimage' => 'Bô poàⁿ ia̍h liân kàu chit tiuⁿ iáⁿ-siōng.',
 
 # MIME search
@@ -763,9 +749,9 @@ Template:Khu-pia̍t-ia̍h',
 # Miscellaneous special pages
 'nbytes' => '$1 {{PLURAL:$1|jī-goân|jī-goân}}',
 'ncategories' => '$1 {{PLURAL:$1|ê lūi-pia̍t |ê lūi-pia̍t}}',
-'nlinks' => '$1 {{PLURAL:$1|ê|ê}} liân-kiat',
+'nlinks' => '$1 ê liân-kiat',
 'nmembers' => '$1 ê sêng-oân',
-'nrevisions' => '$1 {{PLURAL:$1|ê|ê}} siu-tēng-pún',
+'nrevisions' => '$1 ê siu-tēng-pún',
 'lonelypages' => 'Ko·-ia̍h',
 'uncategorizedpages' => 'Bô lūi-pia̍t ê ia̍h',
 'uncategorizedcategories' => 'Bô lūi-pia̍t ê lūi-pia̍t',
@@ -782,7 +768,7 @@ Template:Khu-pia̍t-ia̍h',
 'mostcategories' => 'Siōng chē lūi-pia̍t ê ia̍h',
 'mostimages' => 'Siōng chia̍p liân-kiat ê iáⁿ-siōng',
 'mostrevisions' => 'Siōng chia̍p siu-kái ê ia̍h',
-'prefixindex' => 'SóÍ\98-Å« chiàu sû-thâu sek-ín liáu Ãª  iaÌ\8dh',
+'prefixindex' => 'Sû-thâu sek-ín',
 'shortpages' => 'Té-ia̍h',
 'deadendpages' => 'Khu̍t-thâu-ia̍h',
 'deadendpagestext' => 'Ē-kha ê ia̍h bô liân kàu wiki lāi-té ê kî-thaⁿ ia̍h.',
@@ -794,8 +780,7 @@ Template:Khu-pia̍t-ia̍h',
 'ancientpages' => 'Kó·-ia̍h',
 'move' => 'Sóa khì',
 'movethispage' => 'Sóa chit ia̍h',
-'unusedimagestext' => 'Ē-kha ê tóng-àn bô poàⁿ ia̍h ū teh iōng. M̄-koh ia̍h lâu leh.
-Chhiáⁿ chù-ì: kî-thaⁿ ê bāng-chām ū khó-lêng iōng URL ti̍t-chiap liân kàu iáⁿ-siōng, só·-í sui-jiân bô teh iōng, mā sī ē lia̍t tī chia.',
+'unusedimagestext' => '<p>Chhiáⁿ chù-ì: kî-thaⁿ ê bāng-chām ū khó-lêng iōng URL ti̍t-chiap liân kàu iáⁿ-siōng, só·-í sui-jiân chhiâng-chāi teh iōng, mā sī ē lia̍t tī chia.</p>',
 'unusedcategoriestext' => 'Ū ē-kha chiah-ê lūi-pia̍t-ia̍h, m̄-koh bô kî-thaⁿ ê bûn-chiuⁿ a̍h-sī lūi-pia̍t lī-iōng.',
 
 # Book sources
@@ -803,7 +788,7 @@ Chhiáⁿ chù-ì: kî-thaⁿ ê bāng-chām ū khó-lêng iōng URL ti̍t-chiap
 
 # Special:Log
 'specialloguserlabel' => 'Iōng-chiá:',
-'speciallogtitlelabel' => 'Bo̍k-piau (sû-tiâu ia̍h iōng-chiá) :',
+'speciallogtitlelabel' => 'Sû-tiâu:',
 'logempty' => 'Log lāi-bīn bô sio-tùi ê hāng-bo̍k.',
 
 # Special:AllPages
@@ -820,9 +805,9 @@ Chhiáⁿ chù-ì: kî-thaⁿ ê bāng-chām ū khó-lêng iōng URL ti̍t-chiap
 
 # Special:Categories
 'categories' => 'Lūi-pia̍t',
-'categoriespagetext' => 'Ē-kha {{PLURAL:$1| ê ūi-pia̍t|ê ūi-pia̍t}} ū ia̍h ia̍h-sī mûi-thé.
-[[Special:UnusedCategories|Bô iōng tio̍h ê ūi-pia̍t]] tō bô tī chiah hián-sī.
-Lēng-goā thang chham-khó [[Special:WantedCategories|beh ti̍h ê lūi-pia̍t]].',
+'categoriespagetext' => 'Chit ê wiki ū ē-kha chia ê lūi-pia̍t.
+[[Special:UnusedCategories|Unused categories]] are not shown here.
+Also see [[Special:WantedCategories|wanted categories]].',
 'categoriesfrom' => 'Tùi chit ê lūi-pia̍t khai-sí hián-sī:',
 
 # Special:DeletedContributions
@@ -830,20 +815,19 @@ Lēng-goā thang chham-khó [[Special:WantedCategories|beh ti̍h ê lūi-pia̍t]
 'deletedcontributions-title' => 'Hō͘ lâng thâi tiāu ê kòng-hiàn',
 
 # Special:LinkSearch
-'linksearch' => 'Chhoē chām-goā ê liân-kiat',
+'linksearch' => 'Chhiau-chhoē chām-goā liân-kiat',
 
 # E-mail user
 'mailnologin' => 'Bô siu-phoe ê chū-chí',
 'mailnologintext' => 'Lí it-tēng ài [[Special:UserLogin|teng-ji̍p]] jī-chhiáⁿ ū 1 ê ū-hāu ê e-mail chū-chí tī lí ê [[Special:Preferences|iōng-chiá siat-tēng]] chiah ē-tàng kià e-mail hō· pa̍t-ūi iōng-chiá.',
 'emailuser' => 'Kià e-mail hō· iōng-chiá',
 'emailpage' => 'E-mail iōng-chiá',
-'emailpagetext' => 'Lí ē-tàng iōng ē-kha ê pió kià chi̍t tiuⁿ phe hō͘ chit ê iōng-chiá.
-Lí ê [[Special:Preferences|siat-tēng]] ê tiān-chú-phe tē-chí ē chhut-hiān tī tiān-chú-phe ê "Kià-phe-chiá" (From) hit ūi. Án-ne siu-phe-chiá chiah ū hoat-tō· kā lí hôe-phe.',
+'emailpagetext' => 'Ká-sú chit ê iōng-chiá ū siat-tēng 1 ê ū-hāu ê e-mail chū-chí, lí tō ē-tàng ēng ē-kha chit tiuⁿ FORM hoat sìn-sek hō· i. Lí siat-tēng ê e-mail chū-chí ē chhut-hiān tī e-mail ê "Kià-phoe-jîn" (From) hit ūi. Án-ne siu-phoe-jîn chiah ū hoat-tō· kā lí hôe-phoe.',
 'noemailtitle' => 'Bô e-mail chū-chí',
-'noemailtext' => 'Chit ūi iōng-chiá pēng-bô lâu ū-hāu ê e-mail chū-chí.',
-'emailfrom' => 'Lâi chū:',
-'emailto' => 'Khì hō·:',
-'emailsubject' => 'Tê-bo̍k:',
+'noemailtext' => 'Chit ūi iōng-chiá pēng-bô lâu ū-hāu ê e-mail chū-chí, bô tio̍h-sī i bô beh chiap-siū pat-ūi iōng-chiá ê e-mail.',
+'emailfrom' => 'Lâi chū',
+'emailto' => 'Khì hō·',
+'emailsubject' => 'Tê-bo̍k',
 'emailmessage' => 'Sìn-sit:',
 'emailsend' => 'Sàng chhut-khì',
 'emailsent' => 'E-mail sàng chhut-khì ah',
@@ -856,7 +840,7 @@ Lí ê [[Special:Preferences|siat-tēng]] ê tiān-chú-phe tē-chí ē chhut-hi
 'watchnologin' => 'Bô teng-ji̍p',
 'watchnologintext' => 'Lí it-tēng ài [[Special:UserLogin|teng-ji̍p]] chiah ē-tàng siu-kái lí ê kàm-sī-toaⁿ.',
 'addedwatchtext' => "\"[[:\$1]]\" chit ia̍h í-keng ka-ji̍p lí ê [[Special:Watchlist|kàm-sī-toaⁿ]]. Bī-lâi chit ia̍h a̍h-sī siong-koan ê thó-lūn-ia̍h nā ū kái-piàn, ē lia̍t tī hia. Tông-sî tī [[Special:RecentChanges|Chòe-kīn ê kái-piàn]] ē iōng '''chho·-thé''' hián-sī ia̍h ê piau-tê, án-ne khah bêng-hián. Ká-sú lí beh chiōng chit ia̍h tùi lí ê kàm-sī-toaⁿ tû tiāu, khì khòng-chè-tiâu chhi̍h \"Mài kàm-sī\" chiū ē-sái-tit.",
-'removedwatchtext' => '"[[:$1]]" chit ia̍h í-keng tùi lí ê [[Special:Watchlist|kàm-sī-toaⁿ]] soá cháu.',
+'removedwatchtext' => '"[[:$1]]" chit ia̍h í-keng tùi lí ê kàm-sī-toaⁿ tû tiāu.',
 'watch' => 'kàm-sī',
 'watchthispage' => 'Kàm-sī chit ia̍h',
 'unwatch' => 'Mài kàm-sī',
@@ -865,8 +849,8 @@ Lí ê [[Special:Preferences|siat-tēng]] ê tiān-chú-phe tē-chí ē chhut-hi
 'watchlist-details' => 'Kàm-sī-toaⁿ ū {{PLURAL:$1|$1 ia̍h|$1 ia̍h}}, thó-lūn-ia̍h bô sǹg chāi-lāi.',
 'watchmethod-recent' => 'tng teh kíam-cha choè-kīn ê siu-kái, khoàⁿ ū kàm-sī ê ia̍h bô',
 'watchmethod-list' => 'tng teh kiám-cha kàm-sī ê ia̍h khoàⁿ chòe-kīn ū siu-kái bô',
-'watchlistcontains' => 'Lí ê kàm-sī-toaⁿ siu {{PLURAL:$1|ia̍h|ia̍h}} .',
-'wlnote' => "Ē-kha sī tī $3, $4 chìn-chêng {{PLURAL:chi tiám-cheng|'''$2''' tiám-cheng}} í-lâi ê {{PLURAL:$1| chi̍t piàn|'''$1''' piàn}} siu-kái.",
+'watchlistcontains' => 'Lí ê kàm-sī-toaⁿ siu $1 ia̍h.',
+'wlnote' => "Ē-kha sī '''$2''' tiám-cheng í-lāi siōng sin ê $1 ê kái-piàn.",
 'wlshowlast' => 'Hián-sī chêng $1 tiám-cheng $2 ji̍t $3',
 
 # Delete
@@ -876,7 +860,7 @@ Lí ê [[Special:Preferences|siat-tēng]] ê tiān-chú-phe tē-chí ē chhut-hi
 'excontentauthor' => "loē-iông sī: '$1' (î-it ê kòng-hiàn-chiá sī '[[Special:Contributions/$2|$2]]')",
 'exbeforeblank' => "chìn-chêng ê lōe-iông sī: '$1'",
 'exblank' => 'ia̍h khang-khang',
-'historywarning' => 'Kéng-kò: Lí beh thâi ê ia̍h ū {{PLURAL:$1| ê siu-tèng le̍k-sú|ê siu-tèng le̍k-sú}}:',
+'historywarning' => 'Kéng-kò: Lí beh thâi ê ia̍h ū le̍k-sú:',
 'confirmdeletetext' => 'Lí tih-beh kā 1 ê ia̍h a̍h-sī iáⁿ-siōng (pau-koat siong-koan ê le̍k-sú) éng-kiú tùi chu-liāu-khò· thâi tiāu. Chhiáⁿ khak-tēng lí àn-sǹg án-ne chò, jī-chhiáⁿ liáu-kái hiō-kó, jī-chhiáⁿ bô ûi-hoán [[{{MediaWiki:Policy-url}}]].',
 'actioncomplete' => 'Chip-hêng sêng-kong',
 'deletedtext' => '"$1" í-keng thâi tiāu. Tùi $2 khoàⁿ-ē-tio̍h chòe-kīn thâi ê kì-lo̍k.',
@@ -889,14 +873,12 @@ Lí ê [[Special:Preferences|siat-tēng]] ê tiān-chú-phe tē-chí ē chhut-hi
 'rollbacklink' => 'ká tńg khì',
 'rollbackfailed' => 'Ká bē tńg khì',
 'cantrollback' => 'Bô-hoat-tō· kā siu-kái ká-tńg--khì; téng ūi kòng-hiàn-chiá sī chit ia̍h î-it ê chok-chiá.',
-'alreadyrolled' => 'Bô-hoat-tō· kā [[User:$2|$2]] ([[User talk:$2|Thó-lūn]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]) tùi [[:$1]] ê siu-kái ká-tńg-khì;
-í-keng ū lâng siu-kái a̍h-sī ká-tńg chit ia̍h.
-Téng 1 ūi siu-kái-chiá sī [[User:$3|$3]] ([[User talk:$3|talk]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).',
-'editcomment' => "Pian-chi̍p kài-iàu sī: \"''\$1''\".",
+'alreadyrolled' => 'Bô-hoat-tō· kā [[User:$2|$2]] ([[User talk:$2|Thó-lūn]]) tùi [[:$1]] ê siu-kái ká-tńg-khì; í-keng ū lâng siu-kái a̍h-sī ká-tńg chit ia̍h. Téng 1 ūi siu-kái-chiá sī [[User:$3|$3]] ([[User talk:$3|Thó-lūn]]).',
+'editcomment' => "Siu-kái phêng-lūn sī: \"''\$1''\".",
 
 # Protect
 'protectedarticle' => 'pó-hō͘ "[[$1]]"',
-'protect-title' => 'Kái "$1" ê pó-hō· tíng-kip.',
+'protect-title' => 'Pó-hō· "$1"',
 'prot_1movedto2' => '[[$1]] sóa khì tī [[$2]]',
 'protect-legend' => 'Khak-tēng beh pó-hō·',
 'protectcomment' => 'Lí-iû:',
@@ -948,15 +930,14 @@ Téng 1 ūi siu-kái-chiá sī [[User:$3|$3]] ([[User talk:$3|talk]]{{int:pipe-s
 'ipbsubmit' => 'Hong-só chit ūi iōng-chiá',
 'badipaddress' => 'Bô-hāu ê IP chū-chí',
 'blockipsuccesssub' => 'Hong-só sêng-kong',
-'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] í-keng pī hong-só. <br />Khì [[Special:BlockList|hong-só lia̍t-toaⁿ]] thang khoàⁿ pī hong-só ê .',
-'ipusubmit' => 'Chhú-siau chit ê hong-só',
-'ipblocklist' => 'Siū hong-só ê iōng-chiá',
+'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] í-keng pī hong-só. <br />Khì [[Special:BlockList|IP hong-só lia̍t-toaⁿ]] review hong-só ê IP.',
+'ipusubmit' => 'Chhú-siau hong-só chit ê chū-chí',
+'ipblocklist' => 'Siū hong-só ê IP chū-chí kap iōng-chiá miâ-chheng',
 'blocklink' => 'hong-só',
 'contribslink' => 'kòng-hiàn',
-'autoblocker' => 'Chū-tōng kìm-chí lí sú-iōng, in-ūi lí kap "[[User:$1|$1]]" kong-ke kāng 1 ê IP chū-chí.
-$1 ê kìm-chí lí-iû sī in-ūi "$2".',
+'autoblocker' => 'Chū-tōng kìm-chí lí sú-iōng, in-ūi lí kap "$1" kong-ke kāng 1 ê IP chū-chí (kìm-chí lí-iû "$2").',
 'blocklogentry' => 'hong-só [[$1]], siat kî-hān chì $2 $3',
-'blocklogtext' => 'Chit-ê kì-lio̍k lia̍t-chhut hong-só/khui-só ê tōng-chok. Chū-tōng block ê IP tē-chí bô lia̍t--chhut-lâi ([[Special:BlockList|hong-só chheng-toaⁿ]] ū hiān-chú-sî ū-hāu ê kìm-chí hong-só o·-miâ-toaⁿ).',
+'blocklogtext' => 'Chit-ê log lia̍t-chhut block/unblock ê tōng-chok. Chū-tōng block ê IP chū-chí bô lia̍t--chhut-lâi ([[Special:BlockList]] ū hiān-chú-sî ū-hāu ê block/ban o·-miâ-toaⁿ).',
 'block-log-flags-nocreate' => 'Khui kháu-chō thêng-iōng ah',
 
 # Developer tools
@@ -965,9 +946,9 @@ $1 ê kìm-chí lí-iû sī in-ūi "$2".',
 # Move page
 'move-page' => '徙$1',
 'move-page-legend' => 'Sóa ia̍h',
-'movepagetext' => "Ē-kha chit ê pió iōng lâi kái 1 ê ia̍h ê piau-tê (miâ-chheng); só·-ū siong-koan ê le̍k-sú ē tòe leh sóa khì sin piau-tê.
+'movepagetext' => "Ē-kha chit ê form> iōng lâi kái 1 ê ia̍h ê piau-tê (miâ-chheng); só·-ū siong-koan ê le̍k-sú ē tòe leh sóa khì sin piau-tê.
 Kū piau-tê ē chiâⁿ-chò 1 ia̍h choán khì sin piau-tê ê choán-ia̍h.
-Liân khì kū piau-tê ê liân-kiat (link) bē khì tāng--tio̍h; ē-kì-tit chhiau-chhōe [[Special:DoubleRedirects|siang-thâu (double)]] ê a̍h-sī [[Special:BrokenRedirects|kò·-chiòng ê choán-ia̍h]].
+Liân khì kū piau-tê ê liân-kiat (link) bē khì tāng--tio̍h; ē-kì-tit chhiau-chhōe siang-thâu (double) ê a̍h-sī kò·-chiòng ê choán-ia̍h.
 Lí ū chek-jīm khak-tēng liân-kiat kè-sio̍k liân tio̍h ūi.
 
 Sin piau-tê nā í-keng tī leh (bô phian-chi̍p koè ê khang ia̍h, choán-ia̍h bô chún-sǹg), tō bô-hoat-tō· soá khì hia.
@@ -1004,8 +985,7 @@ Liâu--lo̍h-khì chìn-chêng, chhiáⁿ seng khak-tēng lí ū liáu-kái chia
 'allmessagesname' => 'Miâ',
 'allmessagesdefault' => 'Siat piān ê bûn-jī',
 'allmessagescurrent' => 'Bo̍k-chêng ê bûn-jī',
-'allmessagestext' => 'Che sī MediaWiki: miâ-khong-kan lāi-té ê hē-thóng sìn-sit chheng-toaⁿ.
-Lí nā beh tàu saⁿ-kang hoan-e̍k. Chhiáⁿ kàu [//www.mediawiki.org/wiki/Localisation MediaWiki chāi-tè-hoà] kap [//translatewiki.net translatewiki.net] bāng-chām.',
+'allmessagestext' => 'Chia lia̍t chhut só·-ū tī MediaWiki: miâ-khong-kan ê hē-thóng sìn-sit.',
 
 # Thumbnails
 'thumbnail-more' => 'Hòng-tōa',
@@ -1056,30 +1036,30 @@ Lí ē-sái khoàⁿ i ê goân-sú-bé.',
 'tooltip-summary' => 'Siá chi̍t-ê kán-tan soat-bêng',
 
 # Attribution
-'anonymous' => '{{SITENAME}} ê {{PLURAL:$1|ê bô kì-miâ ê iōng-chiá|ê bô kì-miâ ê iōng-chiá}} .',
+'anonymous' => '{{SITENAME}} bô kì-miâ ê iōng-chiá',
 'siteuser' => '{{SITENAME}} iōng-chiá $1',
 'othercontribs' => 'Kin-kù $1 ê kòng-hiàn.',
-'siteusers' => '{{SITENAME}} {{PLURAL:$2|iōng-chiá|iōng-chiá}} $1',
+'siteusers' => '{{SITENAME}} iōng-chiá $1',
 
 # Patrolling
 'markaspatrolleddiff' => 'Phiau-sī sûn--kòe',
-'markedaspatrolledtext' => 'Soán-te̍k  ê siu-tēng-pún [[:$1]]  í-keng kì-hō chò sûn--kòe.',
+'markedaspatrolledtext' => 'Í-keng phiau-sī chit ê siu-tēng-pún ū lâng sûn--kòe.',
 
 # Image deletion
 'deletedrevision' => 'Kū siu-tēng-pún $1 thâi-tiāu ā.',
 
 # Browsing diffs
-'previousdiff' => '← Khì chêng 1 ê siu-kái',
-'nextdiff' => 'Khì āu 1 ê siu-kái →',
+'previousdiff' => '← Khì chêng 1 ê diff',
+'nextdiff' => 'Khì āu 1 ê diff →',
 
 # Media information
-'imagemaxsize' => "Iáⁿ-siōng toā-sè ê hān-chè:<br />''(ēng tī tóng-àn soeh-bêng-ia̍h)''",
+'imagemaxsize' => 'Iáⁿ-siōng biô-su̍t-ia̍h ê tô· ke̍k-ke hián-sī jōa tōa tiuⁿ:',
 'thumbsize' => 'Sok-tô· (thumbnail) jōa tōa tiuⁿ:',
 'file-nohires' => 'Bô khah koân ê kái-sek-tō͘.',
 
 # Special:NewFiles
 'newimages' => 'Sin iáⁿ-siōng oē-lóng',
-'imagelisttext' => "Í-hā sī '''$1''' {{PLURAL:$1|tiuⁿ|tiuⁿ}} iáⁿ-siōng ê lia̍t-toaⁿ, chiàu $2 pâi-lia̍t.",
+'imagelisttext' => "Í-hā sī '''$1''' tiuⁿ iáⁿ-siōng ê lia̍t-toaⁿ, $2 pâi-lia̍t.",
 'ilsubmit' => 'Kiám-sek',
 'bydate' => 'chiàu ji̍t-kî',
 
@@ -1089,7 +1069,7 @@ Lí ē-sái khoàⁿ i ê goân-sú-bé.',
 
 # External editor support
 'edit-externally' => 'Iōng gōa-pō· èng-iōng nńg-thé pian-chi̍p chit-ê tóng-àn',
-'edit-externally-help' => '(Khoàⁿ [//www.mediawiki.org/wiki/Manual:External_editors siat-tēng soat-bêng] ê chu-liāu.)',
+'edit-externally-help' => 'Chham-khó [http://www.mediawiki.org/wiki/Manual:External_editors Help:External_editors] ê soat-bêng.',
 
 # 'all' in various places, this might be different for inflected languages
 'watchlistall2' => 'choân-pō͘',
@@ -1112,11 +1092,7 @@ Chhiáⁿ khui ē-kha chit-ê liân-kiat, thang khak-jīn chit-ê kháu-chō si
 
 $3
 
-Nā-chún *m̄-sī* lí, chhiáⁿ khui ē-kha chit-ê liân-kiat,  chhú-siau khak-jīn ê e-mail.
-
-$5
-
-Chit tiuⁿ phoe ê khak-jīn-bé ē chū-tōng tī $4 kòe-kî.',
+Nā-chún *m̄-sī* lí, chhiáⁿ mài tòe liân-kiat khì.  Chit tiuⁿ phoe ê khak-jīn-bé ē chū-tōng tī $4 kòe-kî.',
 'confirmemail_body_changed' => 'Ū lâng (IP $1, tāi-khài sī lí pún-lâng) tī {{SITENAME}} ēng chit-ê e-mail chū-chí chù-chheh 1 ê kháu-chō "$2".
 
 Chhiáⁿ khui ē-kha chit-ê liân-kiat, thang khak-jīn chit-ê kháu-chō si̍t-chāi sī lí ê:
@@ -1154,12 +1130,12 @@ Chit tiuⁿ phoe ê khak-jīn-bé ē chū-tōng tī $4 kòe-kî.',
 # Auto-summaries
 'autosumm-blank' => 'Kā ia̍h ê loē-iông the̍h tiāu',
 'autoredircomment' => 'Choán khì [[$1]]',
-'autosumm-new' => 'Sin ia̍h: $1...',
+'autosumm-new' => 'Sin ia̍h: $1',
 
 # Watchlist editor
-'watchlistedit-numitems' => 'Lí ê kàm-sī-toaⁿ ū {{PLURAL:$1|$1 ia̍h|$1 ia̍h}}, thó-lūn-ia̍h bô sǹg chāi-lāi.',
+'watchlistedit-numitems' => 'Lí ê kàm-sī-toaⁿ ū $1 ia̍h, thó-lūn-ia̍h bô sǹg chāi-lāi.',
 'watchlistedit-normal-submit' => 'Mài kàm-sī',
-'watchlistedit-normal-done' => 'Í-keng ū {{PLURAL:$1| ia̍h| ia̍h}} ùi lí ê kám-sī-toaⁿ soá cháu:',
+'watchlistedit-normal-done' => 'Í-keng ū $1 ia̍h ùi lí ê kám-sī-toaⁿ soá cháu:',
 
 # Watchlist editing tools
 'watchlisttools-edit' => 'Khoàⁿ koh kái kàm-sī-toaⁿ',
index 08909fd..a53e07c 100644 (file)
@@ -1156,6 +1156,8 @@ Deze parameters zijn weggelaten.',
 'node-count-exceeded-warning' => 'Op de pagina is het maximale aantal nodes overschreden',
 'expansion-depth-exceeded-category' => "Pagina's waar de expansiediepte is overschreden",
 'expansion-depth-exceeded-warning' => 'De pagina bevat te veel sjablonen',
+'parser-unstrip-loop-warning' => 'Er is een "unstrip"-lus gedetecteerd',
+'parser-unstrip-recursion-limit' => 'De recursielimiet ($1) voor "unstrip" is overschreden',
 
 # "Undo" feature
 'undo-success' => 'Deze bewerking kan ongedaan gemaakt worden.
index 99e8c65..13916a6 100644 (file)
@@ -21,6 +21,7 @@
  * @author Kaganer
  * @author Lajsikonik
  * @author Lampak
+ * @author Lazowik
  * @author Leinad
  * @author Maikking
  * @author Marcin Łukasz Kiejzik
@@ -1247,6 +1248,8 @@ Użycie linków nawigacyjnych kasuje wybór w kolumnie.',
 
 # Diffs
 'history-title' => 'Historia edycji „$1”',
+'difference-title' => 'Różnica pomiędzy wersjami strony "$1"',
+'difference-title-multipage' => 'Różnica pomiędzy stronami "$1" i "$2"',
 'difference-multipage' => '(Różnica między stronami)',
 'lineno' => 'Linia $1:',
 'compareselectedversions' => 'porównaj wybrane wersje',
index 18a2222..acb2696 100644 (file)
@@ -2491,13 +2491,13 @@ Che as sërna, për piasì, un nòm diferent për st'artìcol.",
 'movelogpagetext' => 'Ambelessì sota a-i é na lista ëd tute le pàgine che a son ëstàite tramudà.',
 'movesubpage' => '{{PLURAL:$1|Sot-pàgina|Sot-pàgine}}',
 'movesubpagetext' => "Costa pàgina-sì a l'ha $1 {{PLURAL:$1|sot-pàgina|sot-pàgine}} smonùe sì-sota.",
-'movenosubpage' => "Sta pàgina-sì a l'ha pa ëd sotpàgine.",
+'movenosubpage' => "Sta pàgina-sì a l'ha gnun-e sot-pàgine.",
 'movereason' => 'Rason:',
-'revertmove' => "buta torna coma a l'era",
-'delete_and_move' => 'Scancela e tramuda',
-'delete_and_move_text' => '==A fa da manca dë scancelé==
+'revertmove' => "buté torna coma a l'era",
+'delete_and_move' => 'Scancelé e tramudé',
+'delete_and_move_text' => "==A fa da manca dë scancelé==
 
-L\'artìcol ëd destinassion "[[:$1]]" a-i é già. Veul-lo scancelelo për avej ëd pòst për tramudé l\'àutr?',
+L'artìcol ëd destinassion «[[:$1]]» a-i é già. Veul-lo scancelelo për avèj ëd pòst për tramudé l'àutr?",
 'delete_and_move_confirm' => 'É, scancela la pàgina',
 'delete_and_move_reason' => 'Scancelà për liberé ël pòst për tramudé "[[$1]]"',
 'selfmove' => "Tìtol neuv e tìtol vej a resto midem antra lor; as peul pa tramudesse na pàgina butand-la andoa che a l'é già.",
index d1e089b..a52f1b2 100644 (file)
@@ -2210,7 +2210,7 @@ $2 نے آخری ریوین تک واپس کیتا۔',
 'undelete-error-short' => 'فاغل واپس کرن چ غلطی: $1',
 'undelete-error-long' => 'فائل واپس کرن  لگیاں غلطیاں ہوئیاں:
 $1',
-'undelete-show-file-confirm' => 'تساں نوں کیا پک اے جے تسیں فائل "<نوکی>$1</نوکی>" دی مٹائی ریوین  $2 توں $3 تک ویکھنا چاندے او؟',
+'undelete-show-file-confirm' => 'تساں نوں کیا پک اے جے تسیں فائل "<nowiki>$1</nowiki>" دی مٹائی ریوین  $2 توں $3 تک ویکھنا چاندے او؟',
 'undelete-show-file-submit' => 'ہاں جی',
 
 # Namespace form on various pages
@@ -2577,7 +2577,7 @@ $1',
 'import-revision-count' => '$1 {{PLURAL:$1|ریوین}}',
 'importnopages' => 'لانے آسطے کوئی صفحہ نئیں۔',
 'imported-log-entries' => '{{PLURAL:$1|لاگ انٹریلاگ انٹریاں}}!!لیاندی گئی $1 {{PLURAL:$1|لاگ انٹری}}.',
-'importfailed' => 'لیانا فیل: <نوکی>$1</نوکی>',
+'importfailed' => 'لیانا فیل: <nowiki>$1</nowiki>',
 'importunknownsource' => 'انجان لیان سورس ٹائپ',
 'importcantopen' => 'لیاندی گئی فائل نئیں کھولی جاسکی',
 'importbadinterwiki' => 'پیڑا انٹروکی لنک',
index 97181a7..d2199d3 100644 (file)
@@ -2703,8 +2703,8 @@ Consulte a [[Special:BlockList|lista de bloqueios]] para rever os bloqueios.',
 O registo de bloqueios é fornecido abaixo para referência:',
 'blocklog-showsuppresslog' => 'Este utilizador foi bloqueado e ocultado anteriomente.
 O registo de supressão é fornecido abaixo para referência:',
-'blocklogentry' => 'bloqueou "[[$1]]" $3. O bloqueio expira em $2.',
-'reblock-logentry' => 'modificou parâmetros de bloqueio de [[$1]] $3. O bloqueio expira em $2.',
+'blocklogentry' => 'bloqueou "[[$1]]" por $2. $3',
+'reblock-logentry' => 'modificou parâmetros de bloqueio de [[$1]] com expiração em $2. $3',
 'blocklogtext' => 'Este é um registo de ações de bloqueio e desbloqueio.
 Endereços IP sujeitos a bloqueio automático não estão listados.
 Consulte a [[Special:BlockList|lista de bloqueios]] para obter a lista de bloqueios e banimentos atualmente válidos.',
index bf2316c..2917cf7 100644 (file)
@@ -504,7 +504,7 @@ $messages = array(
 'protectthispage' => 'Proteger esta página',
 'unprotect' => 'Alterar a proteção',
 'unprotectthispage' => 'Alterar a proteção desta página',
-'newpage' => 'Nova página',
+'newpage' => 'Página nova',
 'talkpage' => 'Dialogar sobre esta página',
 'talkpagelinktext' => 'disc',
 'specialpage' => 'Página especial',
@@ -697,6 +697,8 @@ Quem o protegeu foi [[User:$1|$1]], com a justificativa: ''$2''.",
 'filereadonlyerror' => 'Não é possível modificar o arquivo "$1" porque o repositório do arquivo "$2" está em modo somente leitura.
 
 O administrador que bloqueou ofereceu a seguinte explicação: "$3".',
+'invalidtitle-knownnamespace' => 'Título inválido para o espaço nominal "$2" e texto "$3"',
+'invalidtitle-unknownnamespace' => 'Título inválido para o espaço nominal de número desconhecido ($1) e texto "$2"',
 
 # Virus scanner
 'virus-badscanner' => "Má configuração: antivírus desconhecido: ''$1''",
@@ -714,17 +716,17 @@ Não se esqueça de personalizar as suas [[Special:Preferences|preferências no
 'yourname' => 'Nome de usuário:',
 'yourpassword' => 'Senha:',
 'yourpasswordagain' => 'Redigite sua senha',
-'remembermypassword' => 'Recordar os meus dados neste computador (por no máximo $1 {{PLURAL:$1|dia|dias}})',
+'remembermypassword' => 'Lembrar meu login neste navegador (por no máximo $1 {{PLURAL:$1|dia|dias}})',
 'securelogin-stick-https' => 'Permanecer conectado ao HTTPS após a autenticação',
 'yourdomainname' => 'Seu domínio:',
 'externaldberror' => 'Ocorreu ou um erro no banco de dados durante a autenticação ou não lhe é permitido atualizar a sua conta externa.',
 'login' => 'Autenticar-se',
 'nav-login-createaccount' => 'Entrar / criar conta',
 'loginprompt' => 'É necessário estar com cookies ativados para poder autenticar-se no wiki {{SITENAME}}.',
-'userlogin' => 'Criar uma conta ou entrar',
+'userlogin' => 'Entrar / criar conta',
 'userloginnocreate' => 'Entrar',
 'logout' => 'Sair',
-'userlogout' => 'Sair',
+'userlogout' => 'Desconectar',
 'notloggedin' => 'Não autenticado',
 'nologin' => 'Não possui uma conta? $1.',
 'nologinlink' => 'Criar uma conta',
@@ -796,7 +798,7 @@ Você pode ignorar esta mensagem caso a conta tenha sido criada por engano.',
 'login-throttled' => 'Você fez tentativas demais de se autenticar com esta conta recentemente.
 Por favor aguarde antes de tentar novamente.',
 'login-abort-generic' => 'A sua autenticação não teve êxito - Abortada',
-'loginlanguagelabel' => 'Língua: $1',
+'loginlanguagelabel' => 'Idioma: $1',
 'suspicious-userlogout' => 'Sua solicitação para sair foi negada porque aparentemente foi enviada por um navegador danificado ou por um servidor proxy com cache.',
 
 # E-mail sending
@@ -870,14 +872,14 @@ Senha temporária: $2',
 'link_tip' => 'Link interno',
 'extlink_sample' => 'http://www.example.com título do link',
 'extlink_tip' => 'Link externo (lembre-se do prefixo http://)',
-'headline_sample' => 'Texto do cabeçalho',
+'headline_sample' => 'Conteúdo do cabeçalho',
 'headline_tip' => 'Seção de nível 2',
 'nowiki_sample' => 'Inserir texto não-formatado aqui',
-'nowiki_tip' => 'Ignorar formato wiki',
+'nowiki_tip' => 'Ignorar a formatação wiki',
 'image_sample' => 'Exemplo.jpg',
 'image_tip' => 'Arquivo embutido',
 'media_sample' => 'Exemplo.ogg',
-'media_tip' => 'Link para arquivo',
+'media_tip' => 'Link para arquivo',
 'sig_tip' => 'Sua assinatura, com hora e data',
 'hr_tip' => 'Linha horizontal (use de forma moderada)',
 
@@ -891,7 +893,8 @@ Senha temporária: $2',
 'showpreview' => 'Mostrar previsão',
 'showlivepreview' => 'Pré-visualização em tempo real',
 'showdiff' => 'Mostrar alterações',
-'anoneditwarning' => "'''Atenção''': Você não se encontra autenticado. O seu endereço de IP será registrado no histórico de edições desta página.",
+'anoneditwarning' => "'''Atenção''': Você não se encontra autenticado.
+O seu endereço de IP será registrado no histórico de edições desta página.",
 'anonpreviewwarning' => "''Você não está logado. Gravar registará o seu endereço IP no histórico de edições desta página.''",
 'missingsummary' => "'''Lembrete:''' Você não introduziu um sumário de edição. Se clicar novamente em Salvar, a sua edição será salva sem um sumário.",
 'missingcommenttext' => 'Por favor, introduzida um comentário abaixo.',
@@ -944,17 +947,16 @@ Ela pode ter sido movida ou removido enquanto você estava vendo a página.',
 
 A senha para esta nova conta pode ser alterada na página ''[[Special:ChangePassword|de troca de senha]]'', após a autenticação.",
 'newarticle' => '(Nova)',
-'newarticletext' => "Você seguiu um link para uma página que não existe.
-Para criá-la, comece escrevendo na caixa abaixo
-(veja [[{{MediaWiki:Helppage}}|a página de ajuda]] para mais informações).
-Se você chegou aqui por engano, apenas clique no botão '''voltar''' do seu navegador.",
+'newarticletext' => "Você seguiu um link para uma página que ainda não existe.
+Para criá-la, comece escrevendo na caixa abaixo (veja [[{{MediaWiki:Helppage}}|a página de ajuda]] para mais informações).
+Se você chegou aqui por engano, clique no botão '''voltar''' do seu navegador.",
 'anontalkpagetext' => "---- ''Esta é a página de discussão para um usuário anônimo que ainda não criou uma conta ou que não a usa, de forma que temos de utilizar o endereço de IP para identificá-lo(a). Tal endereço de IP pode ser compartilhado por vários usuários. Se você é um usuário anônimo e acha que comentários irrelevantes foram direcionados a você, por gentileza, [[Special:UserLogin/signup|crie uma conta]] ou [[Special:UserLogin|autentique-se]], a fim de evitar futuras confusões com outros usuários anônimos.''",
 'noarticletext' => 'No momento, não há conteúdo nesta página.
-Você pode [[Special:Search/{{PAGENAME}}|pesquisar pelo título desta página]] em outras páginas <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar por registros relacionados],
+Você pode [[Special:Search/{{PAGENAME}}|pesquisar pelo título desta página]] em outras páginas, <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar por registros relacionados],
 ou [{{fullurl:{{FULLPAGENAME}}|action=edit}} criar esta página]</span>.',
-'noarticletext-nopermission' => 'Não há actualmente texto nesta página.
-Você pode [[Special:Search/{{PAGENAME}}|procurar este título de página]] em outras páginas,
-ou <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} procurar os registos relacionados] </span>.',
+'noarticletext-nopermission' => 'No momento, não há conteúdo nesta página
+Você pode [[Special:Search/{{PAGENAME}}|pesquisar pelo título desta página]] em outras páginas,
+ou <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar por registros relacionados] </span>.',
 'userpage-userdoesnotexist' => 'A conta "<nowiki>$1</nowiki>" não se encontra registrada.
 Verifique se deseja mesmo criar/editar esta página.',
 'userpage-userdoesnotexist-view' => 'A conta de usuário "$1" não está registrada.',
@@ -1035,7 +1037,7 @@ A última entrada no histórico é fornecida abaixo como referência:",
 'templatesusedsection' => '{{PLURAL:$1|Predefinição utilizada|Predefinições utilizadas}} nesta seção:',
 'template-protected' => '(protegida)',
 'template-semiprotected' => '(semi-protegida)',
-'hiddencategories' => 'Esta página integra {{PLURAL:$1|uma categoria oculta|$1 categorias ocultas}}:',
+'hiddencategories' => 'Esta página pertence a {{PLURAL:$1|uma categoria oculta|$1 categorias ocultas}}:',
 'edittools' => '<!-- O texto aqui disponibilizado será exibido abaixo dos formulários de edição e de envio de arquivos. -->',
 'nocreatetitle' => 'A criação de páginas se encontra limitada',
 'nocreatetext' => '{{SITENAME}} tem restringida a habilidade de criar novas páginas.
@@ -1046,9 +1048,9 @@ Volte à tela anterior e edite uma página já existente, ou [[Special:UserLogin
 'permissionserrors' => 'Erros de permissões',
 'permissionserrorstext' => 'Você não possui permissão de fazer isso, {{PLURAL:$1|pelo seguinte motivo|pelos seguintes motivos}}:',
 'permissionserrorstext-withaction' => 'Você não possui permissão para $2, {{PLURAL:$1|pelo seguinte motivo|pelos motivos a seguir}}:',
-'recreate-moveddeleted-warn' => "Atenção: Você está recriando uma página já eliminada em outra ocasião.'''
+'recreate-moveddeleted-warn' => "'''Atenção: Você está recriando uma página já eliminada em outra ocasião.'''
 
-Você deve considerar se é realmente adequado continuar editando esta página.
+Considere se é realmente adequado continuar editando esta página.
 Os registros de eliminação e de movimentação desta página são exibidos a seguir, para sua comodidade:",
 'moveddeleted-notice' => 'Esta página foi eliminada.
 Os registros de eliminação e de movimentação para esta página estão disponibilizados abaixo, para referência.',
@@ -1094,7 +1096,7 @@ A justificativa apresentada por $3 foi ''$2''",
 'viewpagelogs' => 'Ver registros para esta página',
 'nohistory' => 'Não há histórico de revisões para esta página.',
 'currentrev' => 'Revisão atual',
-'currentrev-asof' => 'Edição atual tal como $1',
+'currentrev-asof' => 'Edição atual tal como às $1',
 'revisionasof' => 'Edição das $1',
 'revision-info' => 'Edição feita às $1 por $2',
 'previousrevision' => '← Edição anterior',
@@ -1105,11 +1107,10 @@ A justificativa apresentada por $3 foi ''$2''",
 'last' => 'ult',
 'page_first' => 'primeira',
 'page_last' => 'última',
-'histlegend' => "Seleção para diferenças: marque as caixas de seleção das versões que deseja comparar e clique no botão na parte inferior.<br />
-Legenda: ''({{int:cur}})''' = diferença com relação a versão atual,
-'''({{int:last}})''' = diferença com relação a versão anterior, '''{{int:minoreditletter}}''' = edição menor.",
+'histlegend' => "Como selecionar: marque as caixas de seleção das versões que deseja comparar e pressione enter ou clique no botão na parte inferior do formulário.<br />
+Legenda: '''({{int:cur}})''' = diferenças em relação a última versão, '''({{int:last}})''' = diferenças em relação a versão anterior, '''{{int:minoreditletter}}''' = edição menor.",
 'history-fieldset-title' => 'Navegar pelo histórico',
-'history-show-deleted' => 'Somente eliminados',
+'history-show-deleted' => 'Apenas as eliminadas',
 'histfirst' => 'Mais antigas',
 'histlast' => 'Mais recentes',
 'historysize' => '({{PLURAL:$1|1 byte|$1 bytes}})',
@@ -1153,7 +1154,7 @@ Pode mesmo assim [$1 ver estas diferenças] se deseja prosseguir.",
 Você pode ver a diferença entre revisões; podem existir mais detalhes no [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registo de eliminações].",
 'rev-suppressed-diff-view' => "Uma das revisões desta comparação foi '''suprimida''''.
 Você pode ver esta comparação; detalhes podem ser encontradas no [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} registro de supressão].",
-'rev-delundel' => 'mostrar/esconder',
+'rev-delundel' => 'exibir/ocultar',
 'rev-showdeleted' => 'exibir',
 'revisiondelete' => 'Eliminar/restaurar edições',
 'revdelete-nooldid-title' => 'Nenhuma revisão selecionada',
@@ -1254,6 +1255,8 @@ Certifique-se de que tal alteração manterá a continuidade das ações.',
 
 # Diffs
 'history-title' => 'Histórico de edições de "$1"',
+'difference-title' => 'Mudanças entre as edições de "$1"',
+'difference-title-multipage' => 'Mudanças entre as páginas "$1" e "$2"',
 'difference-multipage' => '(Diferenças entre páginas)',
 'lineno' => 'Linha $1:',
 'compareselectedversions' => 'Compare as versões selecionadas',
@@ -1280,7 +1283,7 @@ Certifique-se de que tal alteração manterá a continuidade das ações.',
 'shown-title' => 'Mostrar $1 {{PLURAL:$1|resultado|resultados}} por página',
 'viewprevnext' => 'Ver ($1 {{int:pipe-separator}} $2) ($3).',
 'searchmenu-legend' => 'Opções de pesquisa',
-'searchmenu-exists' => "*'''Há a página \"[[:\$1]]\" neste wiki.'''",
+'searchmenu-exists' => "'''Há uma página com o nome \"[[:\$1]]\" neste wiki'''",
 'searchmenu-new' => "'''Criar a página \"[[:\$1|\$1]]\" neste wiki!'''",
 'searchhelp-url' => 'Help:Conteúdos',
 'searchmenu-prefix' => '[[Special:PrefixIndex/$1|Navegue pelas páginas com este prefixo]]',
@@ -1299,7 +1302,7 @@ Certifique-se de que tal alteração manterá a continuidade das ações.',
 'search-result-score' => 'Relevância: $1%',
 'search-redirect' => '(redirecionamento de $1)',
 'search-section' => '(seção $1)',
-'search-suggest' => 'Será que quis dizer: $1',
+'search-suggest' => 'Você quis dizer: $1',
 'search-interwiki-caption' => 'Projetos irmãos',
 'search-interwiki-default' => 'Resultados de $1:',
 'search-interwiki-more' => '(mais)',
@@ -1315,7 +1318,7 @@ Certifique-se de que tal alteração manterá a continuidade das ações.',
 'showingresultsheader' => "{{PLURAL:$5|Resulado '''$1''' de '''$3'''|Resultados '''$1 - $2''' de '''$3'''}} para '''$4'''",
 'nonefound' => "'''Nota''': apenas alguns espaços nominais são pesquisados por padrão.
 Tente utilizar o prefixo ''all:'' em sua busca, para pesquisar por todos os conteúdos deste wiki (inclusive páginas de discussão, predefinições etc), ou mesmo, utilizando o espaço nominal desejado como prefixo.",
-'search-nonefound' => 'Não houve resultados para a pesquisa.',
+'search-nonefound' => 'Não há resultados que correspondam à consulta.',
 'powersearch' => 'Pesquisa avançada',
 'powersearch-legend' => 'Pesquisa avançada',
 'powersearch-ns' => 'Pesquisar nos espaços nominais:',
@@ -1614,21 +1617,21 @@ Caso decida fornecê-lo, este será utilizado para dar-lhe crédito pelo seu tra
 'recentchanges' => 'Mudanças recentes',
 'recentchanges-legend' => 'Opções das mudanças recentes',
 'recentchangestext' => 'Acompanhe, a partir desta página, as alterações recentes no wiki {{SITENAME}}.',
-'recentchanges-feed-description' => 'Acompanhe, a partir desta feed, as alterações mais recentes no wiki.',
+'recentchanges-feed-description' => 'Acompanhe neste feed as mudanças mais recentes do wiki.',
 'recentchanges-label-newpage' => 'Esta edição criou uma nova página',
 'recentchanges-label-minor' => 'Esta é uma edição menor',
-'recentchanges-label-bot' => 'Esta edição foi feita por um robô',
+'recentchanges-label-bot' => 'Esta edição foi feita por um bot',
 'recentchanges-label-unpatrolled' => 'Esta edição ainda não foi patrulhada',
 'rcnote' => "A seguir {{PLURAL:$1|está listada '''uma''' alteração ocorrida|estão listadas '''$1''' alterações ocorridas}} {{PLURAL:$2|no último dia|nos últimos '''$2''' dias}}, a partir das $5 de $4.",
-'rcnotefrom' => "Abaixo estão as alterações desde as '''$4''' de '''$3''' (limitadas a '''$1''').",
+'rcnotefrom' => "Seguem as alterações desde as '''$4''' de '''$3''' (limitadas a '''$1''').",
 'rclistfrom' => 'Mostrar as novas alterações a partir das $1',
 'rcshowhideminor' => '$1 edições menores',
-'rcshowhidebots' => '$1 robôs',
+'rcshowhidebots' => '$1 bots',
 'rcshowhideliu' => '$1 usuários registrados',
 'rcshowhideanons' => '$1 usuários anônimos',
 'rcshowhidepatr' => '$1 edições patrulhadas',
 'rcshowhidemine' => '$1 minhas edições',
-'rclinks' => 'Exibir as $1 alterações recentes dos últimos $2 dias<br />$3',
+'rclinks' => 'Exibir as $1 alterações recentes feitas nos últimos $2 dias<br />$3',
 'diff' => 'dif',
 'hist' => 'hist',
 'hide' => 'Ocultar',
@@ -1650,11 +1653,11 @@ Caso decida fornecê-lo, este será utilizado para dar-lhe crédito pelo seu tra
 'recentchangeslinked-feed' => 'Alterações relacionadas',
 'recentchangeslinked-toolbox' => 'Alterações relacionadas',
 'recentchangeslinked-title' => 'Alterações relacionadas com "$1"',
-'recentchangeslinked-noresult' => 'Não ocorreram alterações em páginas relacionadas no intervalo de tempo fornecido.',
+'recentchangeslinked-noresult' => 'Não ocorreram alterações em páginas relacionadas no intervalo de tempo especificado.',
 'recentchangeslinked-summary' => "Esta página lista alterações feitas recentemente em páginas com links a uma em específico (ou de membros de uma categoria especificada).
 Páginas de sua [[Special:Watchlist|lista de páginas vigiadas]] são exibidas em '''negrito'''.",
 'recentchangeslinked-page' => 'Nome da página:',
-'recentchangeslinked-to' => 'Mostrar alterações a páginas relacionadas com a página fornecida',
+'recentchangeslinked-to' => 'Visualizar as alterações nas páginas vinculadas à página especificada ao invés disso',
 
 # Upload
 'upload' => 'Enviar arquivo',
@@ -1907,7 +1910,7 @@ Para melhor segurança, o img_auth.php está desativado.',
 'upload-curl-error28' => 'Tempo limite para o envio do arquivo excedido',
 'upload-curl-error28-text' => 'O site demorou muito tempo para responder. Por gentileza, verifique se o site está acessível, aguarde alguns momentos e tente novamente. Talvez você deseje fazer nova tentativa em um horário menos congestionado.',
 
-'license' => 'Licença:',
+'license' => 'Licenciamento:',
 'license-header' => 'Licenciamento',
 'nolicense' => 'Nenhuma selecionada',
 'license-nopreview' => '(Previsão não disponível)',
@@ -1932,7 +1935,7 @@ Um clique sobre um cabeçalho de coluna altera a ordenação.',
 # File description page
 'file-anchor-link' => 'Arquivo',
 'filehist' => 'Histórico do arquivo',
-'filehist-help' => 'Clique em uma data/horário para ver o arquivo tal como ele se encontrava em tal momento.',
+'filehist-help' => 'Clique em uma data/horário para ver como o arquivo estava em um dado momento.',
 'filehist-deleteall' => 'eliminar todas',
 'filehist-deleteone' => 'eliminar',
 'filehist-revert' => 'restaurar',
@@ -1951,7 +1954,7 @@ Um clique sobre um cabeçalho de coluna altera a ordenação.',
 'linkstoimage-more' => 'Mais de $1 {{PLURAL:$1|página|páginas}} tem algum link para este arquivo.
 A lista a seguir mostra apenas {{PLURAL:$1|o primeiro link|os $1 primeiros links}} para este arquivo.
 Uma [[Special:WhatLinksHere/$2|listagem completa]] está disponível.',
-'nolinkstoimage' => 'Nenhuma página aponta para este arquivo.',
+'nolinkstoimage' => 'Nenhuma página contém links para este arquivo.',
 'morelinkstoimage' => 'Ver [[Special:WhatLinksHere/$1|mais links]] para este arquivo.',
 'linkstoimage-redirect' => '$1 (redirecionamento de arquivo) $2',
 'duplicatesoffile' => '{{PLURAL:$1|O seguinte arquivo é duplicado|Os seguintes arquivos são duplicados}} deste arquivo ([[Special:FileDuplicateSearch/$2|mais detalhes]]):',
@@ -1959,7 +1962,7 @@ Uma [[Special:WhatLinksHere/$2|listagem completa]] está disponível.',
 'sharedupload-desc-there' => 'Este arquivo é do $1 e pode ser utilizado por outros projetos.
 Por favor veja a [$2 página de descrição do arquivo] para mais informações.',
 'sharedupload-desc-here' => 'Este arquivo é do $1 e pode ser utilizado por outros projetos.
-A descrição na sua [$2 página de descrição de arquivo] é exibida abaixo.',
+Sua [$2 página de descrição de arquivo] é reproduzida abaixo.',
 'sharedupload-desc-edit' => 'Este arquivo é do $1 e pode ser utilizado por outros projetos.
 Talvez você deseje editar a descrição na sua [$2 página de descrição de arquivo] por lá.',
 'sharedupload-desc-create' => 'Este arquivo é do $1 e pode ser utilizado por outros projetos.
@@ -2134,14 +2137,14 @@ Por favor note que outros websites podem apontar para um arquivo através de um
 'notargettext' => 'Você não especificou uma página alvo ou um usuário para executar esta função.',
 'nopagetitle' => 'Página alvo não existe',
 'nopagetext' => 'A página alvo especificada não existe.',
-'pager-newer-n' => '{{PLURAL:$1|1 recente|$1 recentes}}',
-'pager-older-n' => '{{PLURAL:$1|1 antiga|$1 antigas}}',
+'pager-newer-n' => '{{PLURAL:$1|posterior|$1 posteriores}}',
+'pager-older-n' => '{{PLURAL:$1|1 anterior|$1 anteriores}}',
 'suppress' => 'Supervisor',
 'querypage-disabled' => 'Esta página especial está desativada para não prejudicar o desempenho.',
 
 # Book sources
-'booksources' => 'Fontes de livros',
-'booksources-search-legend' => 'Procurar por fontes de livrarias',
+'booksources' => 'Fontes bibliográficas',
+'booksources-search-legend' => 'Procurar fontes bibliográficas',
 'booksources-go' => 'Ir',
 'booksources-text' => 'É exibida a seguir uma listagem de links para outros sites que vendem livros novos e usados e que possam possuir informações adicionais sobre os livros que você está pesquisando:',
 'booksources-invalid-isbn' => 'O número ISBN fornecido não parece ser válido; verifique se houve erros ao copiar da fonte original.',
@@ -2158,11 +2161,11 @@ Você pode diminuir a lista escolhendo um tipo de registro, um nome de usuário
 
 # Special:AllPages
 'allpages' => 'Todas as páginas',
-'alphaindexline' => '$1 até $2',
+'alphaindexline' => 'De $1 até $2',
 'nextpage' => 'Próxima página ($1)',
 'prevpage' => 'Página anterior ($1)',
-'allpagesfrom' => 'Mostrar páginas começando em:',
-'allpagesto' => 'Terminar de exibir páginas em:',
+'allpagesfrom' => 'Primeira página na listagem:',
+'allpagesto' => 'Última página na listagem:',
 'allarticles' => 'Todas as páginas',
 'allinnamespace' => 'Todas as páginas (espaço nominal $1)',
 'allnotinnamespace' => 'Todas as páginas (excepto as do espaço nominal $1)',
@@ -2201,7 +2204,7 @@ Veja também [[Special:WantedCategories|categorias pedidas]].',
 'linksearch-text' => 'É possível usar caracteres curinga, como "*.wikipedia.org".
 É necessário, pelo menos, um domínio de nível superior, por exemplo "*.org".<br />
 Protocolos suportados: <tt>$1</tt> (não adicionado nenhum desses em sua pesquisa).',
-'linksearch-line' => '$1 está lincado a partir de $2',
+'linksearch-line' => '$2 possui links para $1',
 'linksearch-error' => "\"Caracteres mágicos\" (''wildcards'') só podem ser suados no início do endereço.",
 
 # Special:ListUsers
@@ -2366,8 +2369,8 @@ Para comentários e pedidos de ajuda:
 'historywarning' => "'''Atenção:''' A página que você está prestes a eliminar possui um histórico com aproximadamente $1 {{PLURAL:$1|revisão|revisões}}:",
 'confirmdeletetext' => 'Encontra-se prestes a eliminar permanentemente uma página ou uma imagem e todo o seu histórico.
 Por favor, confirme que possui a intenção de fazer isto, que compreende as consequências e que encontra-se a fazer isto de acordo com as [[{{MediaWiki:Policy-url}}|políticas]] do projeto.',
-'actioncomplete' => 'Ação completada',
-'actionfailed' => 'A ação falhou',
+'actioncomplete' => 'Ação concluída',
+'actionfailed' => 'Falha na ação',
 'deletedtext' => '"$1" foi eliminada.
 Consulte $2 para um registro de eliminações recentes.',
 'dellogpage' => 'Registro de eliminação',
@@ -2533,41 +2536,41 @@ $1',
 'blanknamespace' => '(Principal)',
 
 # Contributions
-'contributions' => 'Contribuições do usuário',
-'contributions-title' => 'Contribuições do usuário $1',
+'contributions' => 'Contribuições {{GENDER:{{BASEPAGENAME}}|do usuário|da usuária}}',
+'contributions-title' => 'Contribuições {{GENDER:$1|do usuário|da usuária}} $1',
 'mycontris' => 'Minhas contribuições',
 'contribsub2' => 'Para $1 ($2)',
 'nocontribs' => 'Não foram encontradas mudanças com este critério.',
-'uctop' => ' (revisão atual)',
+'uctop' => '(atual)',
 'month' => 'Mês (inclusive anteriores):',
 'year' => 'Ano (inclusive anteriores):',
 
-'sp-contributions-newbies' => 'Mostrar só as contribuições das contas recentes',
+'sp-contributions-newbies' => 'Mostrar apenas as contribuições das novas contas',
 'sp-contributions-newbies-sub' => 'Para contas novas',
 'sp-contributions-newbies-title' => 'Contribuições de contas novas',
 'sp-contributions-blocklog' => 'Registro de bloqueios',
 'sp-contributions-deleted' => 'contribuições eliminadas',
-'sp-contributions-uploads' => 'carregamentos',
+'sp-contributions-uploads' => 'envios',
 'sp-contributions-logs' => 'registros',
 'sp-contributions-talk' => 'disc',
 'sp-contributions-userrights' => 'gerenciamento de privilégios de usuários',
 'sp-contributions-blocked-notice' => 'Este usuário atualmente está bloqueado. O registro de bloqueio mais recente é fornecido abaixo para referência:',
 'sp-contributions-blocked-notice-anon' => 'Este endereço IP encontra-se bloqueado.
 Segue, para referência, a entrada mais recente no registro de bloqueios:',
-'sp-contributions-search' => 'Pesquisar contribuições',
+'sp-contributions-search' => 'Navegar pelas contribuições',
 'sp-contributions-username' => 'Endereço de IP ou usuário:',
-'sp-contributions-toponly' => 'Mostrar somente as revisões mais recentes',
+'sp-contributions-toponly' => 'Mostrar somente as edições que sejam a última alteração',
 'sp-contributions-submit' => 'Pesquisar',
 
 # What links here
 'whatlinkshere' => 'Páginas afluentes',
-'whatlinkshere-title' => 'Páginas que apontam para "$1"',
+'whatlinkshere-title' => 'Páginas que têm links para "$1"',
 'whatlinkshere-page' => 'Página:',
 'linkshere' => "As seguintes páginas possuem links para '''[[:$1]]''':",
-'nolinkshere' => "Não existem links para '''[[:$1]]'''.",
+'nolinkshere' => "Não  links para '''[[:$1]]'''.",
 'nolinkshere-ns' => "Não há links para '''[[:$1]]''' no espaço nominal selecionado.",
 'isredirect' => 'página de redirecionamento',
-'istemplate' => 'inclusão',
+'istemplate' => 'transclusão',
 'isimage' => 'link para o arquivo',
 'whatlinkshere-prev' => '{{PLURAL:$1|anterior|$1 anteriores}}',
 'whatlinkshere-next' => '{{PLURAL:$1|próximo|próximos $1}}',
@@ -2666,8 +2669,8 @@ Consulte a [[Special:BlockList|lista de bloqueios]].',
 O registro de bloqueio é fornecido abaixo, para referência:',
 'blocklog-showsuppresslog' => 'O usuário foi bloqueado e ocultado anteriormente.
 O registro de supressão é fornecido abaixo para referência:',
-'blocklogentry' => 'bloqueou "[[$1]]" $3. O bloqueio expira em $2.',
-'reblock-logentry' => 'modificou parâmetros de bloqueio de [[$1]] $3. O bloqueio expira em $2.',
+'blocklogentry' => 'bloqueou "[[$1]]" por $2. $3',
+'reblock-logentry' => 'modificou parâmetros de bloqueio de [[$1]] com expiração em $2. $3',
 'blocklogtext' => 'Este é um registro de ações de bloqueio e desbloqueio.
 Endereços IP sujeitos a bloqueio automático não são listados.
 Consulte a [[Special:BlockList|lista de bloqueios]] para obter a lista de bloqueios e banimentos em efeito neste momento.',
@@ -2925,6 +2928,7 @@ Salve o arquivo no seu computador e importe-o aqui.',
 'javascripttest-pagetext-frameworks' => 'Escolha uma das seguintes estruturas de teste: $1',
 'javascripttest-pagetext-skins' => 'Escolha o tema para executar os testes:',
 'javascripttest-qunit-intro' => 'Veja a [$1 documentação de testes] no mediawiki.org.',
+'javascripttest-qunit-heading' => 'Suíte de ferramentas de teste JavaScript QUnit para MediaWiki',
 
 # Tooltip help for the actions
 'tooltip-pt-userpage' => 'Sua página de usuário',
@@ -2974,18 +2978,18 @@ Você pode, no entanto, visualiar seu código-fonte.',
 'tooltip-ca-nstab-main' => 'Ver a página de conteúdo',
 'tooltip-ca-nstab-user' => 'Ver a página de usuário',
 'tooltip-ca-nstab-media' => 'Ver a página de mídia',
-'tooltip-ca-nstab-special' => 'Esta é uma página especial, não pode ser editada.',
+'tooltip-ca-nstab-special' => 'Esta é uma página especial. Não é possível editar seu conteúdo de forma direta.',
 'tooltip-ca-nstab-project' => 'Ver a página de projeto',
 'tooltip-ca-nstab-image' => 'Ver a página de arquivo',
 'tooltip-ca-nstab-mediawiki' => 'Ver a mensagem de sistema',
 'tooltip-ca-nstab-template' => 'Ver a predefinição',
 'tooltip-ca-nstab-help' => 'Ver a página de ajuda',
-'tooltip-ca-nstab-category' => 'Ver a página da categoria',
-'tooltip-minoredit' => 'Marcar como edição menor',
-'tooltip-save' => 'Salvaas alterações',
-'tooltip-preview' => 'Prever as alterações, por favor utilizar antes de salvar!',
-'tooltip-diff' => 'Mostrar alterações que fez a este texto.',
-'tooltip-compareselectedversions' => 'Ver as diferenças entre as duas versões selecionadas desta página.',
+'tooltip-ca-nstab-category' => 'Ver a página descritiva da categoria',
+'tooltip-minoredit' => 'Marcar esta alteração como uma edição menor',
+'tooltip-save' => 'Salva as suas alterações',
+'tooltip-preview' => 'Prevê as alterações feitas por você. Antes de salvar, use para ver se está tudo como esperado!',
+'tooltip-diff' => 'Visualizar as alterações que você fez no texto',
+'tooltip-compareselectedversions' => 'Ver o que há de diferente entre as duas versões selecionadas desta página.',
 'tooltip-watch' => 'Adicionar esta página à sua lista de páginas vigiadas',
 'tooltip-watchlistedit-normal-submit' => 'Remover títulos',
 'tooltip-watchlistedit-raw-submit' => 'Atualizar a lista de páginas vigiadas',
@@ -3102,7 +3106,7 @@ Executá-lo poderá comprometer a segurança do seu sistema.",
 'file-info-size-pages' => '$1 × $2 pixels, tamanho do arquivo: $3, tipo MIME: $4, $5 {{PLURAL:$5|página|páginas}}',
 'file-nohires' => 'Sem resolução maior disponível.',
 'svg-long-desc' => 'arquivo SVG, de $1 × $2 pixels, tamanho: $3',
-'show-big-image' => 'Resolução completa',
+'show-big-image' => 'Resolução original',
 'show-big-image-preview' => 'Tamanho desta previsualização: $1.',
 'show-big-image-other' => '{{PLURAL:$2|Outra resolução|Outras resoluções}}: $1.',
 'show-big-image-size' => '$1 × $2 pixels',
@@ -3140,11 +3144,12 @@ Quaisquer outros links nessa mesma linha são considerados exceções (ou seja,
 
 # Metadata
 'metadata' => 'Metadados',
-'metadata-help' => "Este arquivo contém informação adicional, provavelmente adicionada a partir da câmara digital ou ''scanner'' utilizada para criar ou digitalizá-lo.
-Caso o arquivo tenha sido modificado a partir do seu estado original, alguns detalhes poderão não refletir completamente as mudanças efetuadas.",
+'metadata-help' => 'Este arquivo contém dados adicionais, provavelmente adicionados pela câmera digital ou scanner utilizado para criar ou digitalizá-lo.
+Caso o arquivo tenha sofrido alterações, alguns detalhes poderão ser diferentes do que o arquivo atual é.',
 'metadata-expand' => 'Mostrar detalhes adicionais',
 'metadata-collapse' => 'Esconder detalhes restantes',
-'metadata-fields' => 'Os campos de metadados de imagens listados nesta mensagem serão incluídos na página de descrição da imagem quando a tabela de metadados estiver recolhida. Por omissão, outros campos estarão ocultos.
+'metadata-fields' => 'Os campos de metadados de imagens listados nesta mensagem serão incluídos na página de descrição da imagem quando a tabela de metadados estiver recolhida.
+Por padrão, outros campos estarão ocultos.
 * make
 * model
 * datetimeoriginal
@@ -3549,12 +3554,12 @@ Caso o arquivo tenha sido modificado a partir do seu estado original, alguns det
 'exif-urgency-other' => 'Prioridade definida pelo usuário ($1)',
 
 # External editor support
-'edit-externally' => 'Editar este arquivo utilizando uma aplicação externa',
+'edit-externally' => 'Editar este arquivo a partir de um programa externo',
 'edit-externally-help' => '(Consulte as [//www.mediawiki.org/wiki/Manual:External_editors instruções de instalação] para maiores informações)',
 
 # 'all' in various places, this might be different for inflected languages
 'watchlistall2' => 'todas',
-'namespacesall' => 'todas',
+'namespacesall' => 'todos',
 'monthsall' => 'todos',
 'limitall' => 'todas',
 
@@ -3749,6 +3754,8 @@ Em conjunto com este programa deve ter recebido [{{SERVER}}{{SCRIPTPATH}}/COPYIN
 'version-software' => 'Software instalado',
 'version-software-product' => 'Produto',
 'version-software-version' => 'Versão',
+'version-entrypoints' => 'URLs dos pontos de entrada',
+'version-entrypoints-header-entrypoint' => 'Ponto de entrada',
 'version-entrypoints-header-url' => 'URL',
 
 # Special:FilePath
@@ -3792,18 +3799,18 @@ As imagens serão exibidas em sua resolução máxima, outros tipos de arquivos
 'intentionallyblankpage' => 'Esta página foi intencionalmente deixada em branco e é usada para medições de performance, etc.',
 
 # External image whitelist
-'external_image_whitelist' => " # Deixe esta linha exatamente como ela é <pre>
-# Coloque uma expressão regular (apenas a parte que vai entre o //) a seguir
+'external_image_whitelist' => " # Deixe esta linha exatamente como ela está <pre>
+# Insira uma expressão regular (apenas a parte que vai entre o //) a seguir
 # Estas serão casadas com as URLs de imagens externas (''hotlinked'')
-# Aqueles que corresponderem serão exibidos como imagens, caso contrário, apenas uma ligação para a imagem será mostrada
+# Aquelas que corresponderem serão exibidas como imagens; caso contrário, apenas um link para a imagem será mostrado
 # As linhas que começam com # são tratadas como comentários
 # Isto não é sensível à capitalização
 
-# Coloque todos os fragmentos de ''regex'' acima dessa linha. Deixe esta linha exatamente como ela é</pre>",
+# Coloque todos os fragmentos de ''regex'' acima dessa linha. Deixe esta linha exatamente como ela está</pre>",
 
 # Special:Tags
 'tags' => 'Etiquetas de modificação válidas',
-'tag-filter' => 'Filtro de [[Special:Tags|etiquetas]]:',
+'tag-filter' => 'Filtrar [[Special:Tags|etiquetas]]:',
 'tag-filter-submit' => 'Filtrar',
 'tags-title' => 'Etiquetas',
 'tags-intro' => 'Esta página lista as etiquetas com que o software poderá marcar uma edição, e o seu significado.',
index eb85c53..9ccf5f3 100644 (file)
@@ -1966,6 +1966,8 @@ Extensions making use of it:
 Parameters:
 * $1 is the number of operations attempted at once in this case.
 * $2 is the maximum number of operations that can be attempted at once.',
+'backend-fail-usable' => 'Parameters:
+* $1 is a file path',
 
 # File journal errors
 'filejournal-fail-dbconnect' => 'Parameters:
index 7bf69c3..5382fee 100644 (file)
@@ -3107,7 +3107,7 @@ Executându-l, sistemul dvs. poate fi compromis.",
 'file-info-size-pages' => '$1 × $2 pixeli, mărime fișier: $3, tip MIME: $4, $5 {{PLURAL:$5|pagină|pagini}}',
 'file-nohires' => 'Rezoluții mai mari nu sunt disponibile.',
 'svg-long-desc' => 'fișier SVG, cu dimensiunea nominală de $1 × $2 pixeli, mărime fișier: $3',
-'show-big-image' => 'Mărește rezoluția imaginii',
+'show-big-image' => 'Rezoluție maximă',
 'show-big-image-preview' => 'Mărimea acestei previzualizări: $1.',
 'show-big-image-other' => '{{PLURAL:$2|Altă rezoluție|Alte rezoluții}}: $1.',
 'show-big-image-size' => '$1 × $2 pixeli',
index d24fa35..a340fad 100644 (file)
@@ -827,6 +827,7 @@ Ste argumende onne state luete.",
 'parser-template-recursion-depth-warning' => "Ha state supranete 'u limite di ricorsione de le template ($1)",
 'language-converter-depth-warning' => "'U convertitore de lènghe ha subranate 'u limite de profonnetà ($1)",
 'node-count-exceeded-category' => "Pàggene addò 'u cunde de le node ha sbunnate",
+'node-count-exceeded-warning' => "Pagene ha sbunnate 'u condegge de le node",
 'expansion-depth-exceeded-category' => "Pàggene addò 'a profonnetà de l'espanzione jè supranate",
 'expansion-depth-exceeded-warning' => "Pàggene ca sbonnane 'a profonnetà de espanzione",
 
@@ -1009,6 +1010,8 @@ Vide Bbuene ca ausanne le collegaminde de navigazzione sta culonne avène azzera
 
 # Diffs
 'history-title' => 'Liste de le versiune de "$1"',
+'difference-title' => 'Differenze \'mbrà revisiune de "$1"',
+'difference-title-multipage' => 'Differenze \'mbrà le pàggene "$1" e "$2"',
 'difference-multipage' => "(Differenze 'mbrà le pàggene)",
 'lineno' => 'Linea $1:',
 'compareselectedversions' => 'Combronde le versiune selezionete',
@@ -1589,6 +1592,7 @@ Ce 'u probbleme angore jè presende, condatte 'n'[[Special:ListUsers/sysop|ammin
 'backend-fail-read' => "Non ge pozze leggere 'u file $1.",
 'backend-fail-create' => "Non ge pozze ccrejà 'u file $1.",
 'backend-fail-readonly' => 'L\'archivije de rete "$1" jè pe stu mumende in sole letture. \'U mutive ha state: "$2"',
+'backend-fail-synced' => "'U file \"\$1\" jè jndr'à 'nu state ingonsistende jndr'à l'archivije inderne",
 'backend-fail-connect' => 'Non ge pozze connettere \'a memorie de rrete "$1".',
 'backend-fail-internal' => "'N'errore scanusciute s'à verificate jndr'à l'archivije de rrete \"\$1\".",
 'backend-fail-contenttype' => 'Non ge pozze capìe \'u tipe de condenute d\'u file da reggistrà sus a "$1".',
@@ -3887,6 +3891,7 @@ Ce nò, tu puè ausà 'u module facile aqquà sotte. 'U commende tune avène agg
 'api-error-badaccess-groups' => 'Tu non ge puè carecà file sus a sta Uicchi.',
 'api-error-badtoken' => 'Errore inderne: Gettone errate.',
 'api-error-copyuploaddisabled' => "'U carecamende da URL jè disabbilitate sus a stu server.",
+'api-error-duplicate-archive-popup-title' => "Dupliche {{PLURAL:$1|'u file ca ha state|le file ca onne state}} scangellate.",
 'api-error-duplicate-popup-title' => 'Dupleche {{PLURAL:$1|file|file}}',
 'api-error-empty-file' => "'U file ca tu è confermate ere vacande.",
 'api-error-emptypage' => 'Quanne se ne ccreje une, le pàggene vacande non ge sò permesse.',
@@ -3898,6 +3903,7 @@ Ce nò, tu puè ausà 'u module facile aqquà sotte. 'U commende tune avène agg
 'api-error-hookaborted' => "'U cangiamende ca tu stè pruève a ffà ha state inderrotte da 'n'estenzione.",
 'api-error-http' => "Errore inderne: Non ge se riesce a collegà a 'u server",
 'api-error-illegal-filename' => "'U nome d'u file non g'è permesse.",
+'api-error-internal-error' => "Errore inderne: Quaccheccose ha sciute male mendre ca ste processamme 'u carecamende tune sus 'a uicchi.",
 'api-error-invalid-file-key' => "Errore inderne: 'U file non ge se iacchie jndr'à memorie temboranèe.",
 'api-error-missingparam' => 'Errore inderne: Parametre mangande sus a richieste.',
 'api-error-missingresult' => "Errore inderne: Non ge se pò determinà ce 'a copie ha state fatte.",
index a4b4420..77ad310 100644 (file)
@@ -478,7 +478,7 @@ $messages = array(
 'searchbutton' => 'Найти',
 'go' => 'Перейти',
 'searcharticle' => 'Перейти',
-'history' => 'история',
+'history' => 'Ð\98стория',
 'history_short' => 'история',
 'updatedmarker' => 'обновлено после моего последнего посещения',
 'printableversion' => 'Версия для печати',
@@ -1273,7 +1273,7 @@ $1",
 # Diffs
 'history-title' => '$1 — история изменений',
 'difference-title' => 'Разница между пересмотров " $1 "',
-'difference-title-multipage' => 'Разница между страницами " $1 «и» $2 "',
+'difference-title-multipage' => 'Разница между страницами «$1» и «$2»',
 'difference-multipage' => '(Различия между страницами)',
 'lineno' => 'Строка $1:',
 'compareselectedversions' => 'Сравнить выбранные версии',
index 89422fc..bf08c94 100644 (file)
@@ -703,8 +703,8 @@ $2
 'userinvalidcssjstitle' => "'''Увага:''' Тема взгляду „$1“ не екзістує. Не забудьте, же хосновательске .css і .js файлы хоснують малы писмена, наприклад {{ns:user}}:{{BASEPAGENAME}}/vector.css, а не {{ns:user}}:{{BASEPAGENAME}}/Vector.css.",
 'updated' => '(Зміна уложена)',
 'note' => "'''Позначка:'''&nbsp;",
-'previewnote' => "'''Ð\9fамÑ\8fÑ\82айÑ\82е, Ð¶Ðµ Ñ\82о Ð»ÐµÐ¼ Ð¿Ð¾Ð¿ÐµÑ\80еднÑ\97й Ð¿ÐµÑ\80еглÑ\8fд,
-текст іщі не є уложеный!'''",
+'previewnote' => "'''Ð\9fамÑ\8fÑ\82айÑ\82е, Ð¶Ðµ Ñ\82о Ð»ÐµÐ¼ Ð½Ð°Ð³Ð»Ñ\8fд.'''
+Зміны іщі не суть уложены!",
 'previewconflict' => 'Тот нагляд зображує текст так, як буде вызерати по уложіню сторінкы.',
 'session_fail_preview' => "'''Вашу пожадавку ся не подарило зпрацовати, бо были страчены дата сеансу.
 Просиме, спробуйте то зясь.
@@ -3468,4 +3468,14 @@ MediaWiki є дістрібуована в надїї, же буде хосно
 'api-error-uploaddisabled' => 'Начітаваня файлів є на тій вікі выпнуте.',
 'api-error-verification-error' => 'Файл є може пошкодженый, або мать плане росшырїня.',
 
+# Durations
+'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|стороча|стороча|стороч}}',
+
 );
index 5247557..9736af9 100644 (file)
@@ -8,7 +8,9 @@
  * @file
  *
  * @author Albinus
+ * @author David Baskey
  * @author Ghonokuashabaskey
+ * @author Joseph Mardy
  * @author Nipon087
  * @author Salvator
  * @author Samar88
 
 $messages = array(
 # User preference toggles
+'tog-underline' => 'Joṛaoko latarre dag udugoḱma:',
+'tog-justify' => 'Olaḱ kạli mońjte sajao:',
 'tog-hideminor' => 'Nitaḱ bodolaḱre huḍiṅ kạmi danaṅme',
+'tog-hidepatrolled' => 'Joṛaoakanaḱko nãwã bodolaḱte danaṅkam',
+'tog-newpageshidepatrolled' => 'Biḍạakanaḱ sakamko nãwã sakamreaḱ talikare danȧkam',
+'tog-extendwatchlist' => 'Khạli nitoḱ bodolko do baṅ, joto bodolkodo ńeloḱ tạlikare phaylaomẽ.',
+'tog-usenewrc' => 'Cetan darja reaḱ nãwã bodolakanaḱko beoharme',
+'tog-numberheadings' => 'Mukhiạ kathako do actege piṛhipiṛhite sajaḱma',
+'tog-showtoolbar' => 'Joṛaoakanaḱ ṭulbar udugoḱma',
+'tog-editondblclick' => 'Bar dhao lin kate sakam torjomão reaḱ ạidari emogoḱma',
+'tog-editsection' => '[Joṛao] Pahaṭako do joṛao hotete aćtege hoyoḱ lạgit aidạri em ocoḱma',
 'tog-showtoc' => 'Ṭibilre menaḱako ńel ( sakamkore 3 khon jạti hedlayenko)',
 'tog-watchcreations' => 'Sakamko songe  Ińaḱ ńelok tạlikare benao',
+'tog-watchdefault' => 'Sakam tońgey me Iń do ińaḱ ńeloḱ tạlikare joṛaokeda',
+'tog-watchmoves' => 'Sakamko tońgeyme Ińaḱ ńelok tạlikare kulme',
+'tog-watchdeletion' => 'Sakamko tońgeyme Ińaḱ ńeloḱ tạlika khon get́ giḍikam',
+'tog-previewontop' => 'Joṛao bakso purạo lahare unuduḱ hoyoḱma',
+'tog-previewonfirst' => 'Pạhil joṛao purạore unuduḱ hoyoḱma',
+'tog-nocache' => 'Brajar sakam reaḱ kasiṅ bondoemẽ',
 'tog-enotifwatchlistpages' => 'E-mailạńme one tinre in̕aḱ n̕eloḱ tạlika do bodolok',
 'tog-enotifusertalkpages' => 'E-mailạn̕me one tinre in̕aḱ roṛaḱ laṛcaṛ sakam do bodoloḱa',
 'tog-enotifminoredits' => 'E-mailạn̕me arhõ one tinre in̕aḱ sakamre huḍiń kạmi hoyoḱ',
@@ -32,6 +50,10 @@ $messages = array(
 
 'underline-always' => 'Sanam okte',
 'underline-never' => 'Tis hõ ban̕',
+'underline-default' => 'Browjarre cetlekate em hoy akana',
+
+# Font style option in Special:Preferences
+'editfont-serif' => 'Serif fonṭ',
 
 # Dates
 'sunday' => 'Aṭhowar',
@@ -148,7 +170,7 @@ $messages = array(
 'create-this-page' => 'Noa sakam benao me',
 'delete' => 'muchau me',
 'deletethispage' => 'Noa sakam do get giḍikam',
-'undelete_short' => 'Bań get giḍika',
+'undelete_short' => 'Baṅ get giḍik',
 'protect' => "banchao'",
 'protect_change' => 'Judạ',
 'protectthispage' => 'Noa sakam ban̕caome',
@@ -204,7 +226,7 @@ $messages = array(
 'youhavenewmessages' => 'Amaḱ do $1 ($2) menaḱa',
 'newmessageslink' => 'Nãwã sombat',
 'newmessagesdifflink' => 'Mucạt bodol',
-'youhavenewmessagesmulti' => 'Amaḱ nãwã mesag kodo',
+'youhavenewmessagesmulti' => 'Amaḱ nãwã mesagko do $1 menaḱa',
 'editsection' => 'So̠mpado̠n',
 'editold' => 'So̠mpado̠n',
 'viewsourceold' => 'Ńamoḱ jayga',
@@ -216,9 +238,10 @@ $messages = array(
 'hidetoc' => 'uku, Danaṅ',
 'collapsible-collapse' => 'Murchạo caba',
 'collapsible-expand' => 'Phaylao',
-'thisisdeleted' => 'N̕el se doho ruạṛ',
-'viewdeleted' => 'Ńelme',
+'thisisdeleted' => 'Ńel se nãwã aroe hoyuka?',
+'viewdeleted' => '$1 Ńelme',
 'feedlinks' => 'Jom oco',
+'site-rss-feed' => 'RSS jom oco',
 'site-atom-feed' => ' $1 Jom oco',
 'page-atom-feed' => '"$1" khon khudri jom',
 'red-link-title' => '$1 (niạ sakamdo bạnuḱa)',
@@ -247,7 +270,7 @@ Noa hoy renaḱ karon do hoyoḱkana cabak tạrik pharak se noare joṛao sakam
 Judi noa do karon bań hoylen khan, noa do am sopṭoyer re kạtictem ńam daṛeyaḱa.
 Daya katet́ noa do nonde [[Special:ListUsers/sysop|administrator]],  ṭhen lạime, URL hotete.',
 'missingarticle-rev' => '(Nãwã aro#: $1)',
-'missingarticle-diff' => 'pharak',
+'missingarticle-diff' => '(Pharak: $1, $2)',
 'internalerror' => 'Bhitri reaḱ bhul',
 'internalerror_info' => 'Bhitri reaḱ bhul:',
 'filedeleteerror' => '1 sakam do baṅ get́ giḍiḱ lena',
@@ -264,14 +287,17 @@ Noa re do mit se aema bisó menaḱa oka do ńutumre bań beoharok.',
 'ns-specialprotected' => 'Asokay teaḱ sakamkodo baṅ oltoṅgea.',
 
 # Virus scanner
-'virus-scanfailed' => 'Skan do baṇ hoylena',
+'virus-scanfailed' => 'Esken baṅ hoelena (Code $1)',
 'virus-unknownscanner' => 'Baṅ urum anṭvayras:',
 
 # Login and logout pages
+'welcomecreation' => '==Johar,==
+Amaḱ ekaunṭ do tearena.
+Amaḱ [Asokaete:Pasindko {{SITENAME}} pasindko]] bodol alom hiṛińa.',
 'yourname' => 'Beoboharicaḱ ńutum',
 'yourpassword' => 'Uku namber',
 'yourpasswordagain' => 'Arhõ oku namber olme',
-'remembermypassword' => 'In̕aḱ boloḱaḱ disạyme',
+'remembermypassword' => 'Mit khon jạsti pahaṭa reaḱ katha cạbi disạ tahẽnma (Jạsti utạr $1{{PRURAL;$1 din reaḱ din reaḱ}} lạgit)',
 'securelogin-stick-https' => 'Bhitri bolo kate HTTPS re soṅge tãhenme',
 'login' => "bolok' duar",
 'nav-login-createaccount' => 'Boloḱ́ duạr / ekaunt tearme',
@@ -280,10 +306,10 @@ Noa re do mit se aema bisó menaḱa oka do ńutumre bań beoharok.',
 'logout' => 'Bahre oḍoń',
 'userlogout' => 'Bahre oḍoń',
 'notloggedin' => 'Bhitri baṅ bolokana',
-'nologin' => 'Ekaunṭ do menaḱgea?',
+'nologin' => 'Amaḱ do cet́ wikipediare ekauntx banukytama? Ado',
 'nologinlink' => 'account tear me',
 'createaccount' => 'Ṭhai benaome',
-'gotaccount' => 'Ekaunṭ menaḱgeya?',
+'gotaccount' => 'Amaḱ do cet́ miṭten ekaunṭ tear menaḱtama? $1 tearmẽ.',
 'gotaccountlink' => 'Bhitri bolon',
 'userlogin-resetlink' => 'Amaḱ boloḱ talam cạbi sanamem hiṛińkeda?',
 'createaccountmail' => 'E-mail hotete',
@@ -310,7 +336,7 @@ Daya katet́ arhõ kurumuṭuyme.',
 'noemailcreate' => 'Am do mitṭen jewet e-mail ṭhikạna em jaruṛ menaḱtama.',
 'passwordsent' => '"$1" ṭhikạnate resṭariyen e-mail lạgit́te mitṭen oku nambar em hoyena.
 Daya kate ńam porte arhõ bhitri boloḱme.',
-'mailerror' => 'Vul mail em:',
+'mailerror' => 'Vulte kulakan mail:',
 'emailconfirmlink' => 'Amaḱ e-mail ṭhikana do sạriyme.',
 'cannotchangeemail' => 'Ekaunṭ e-mail ṭhikạnakodo noa wiki re baṅ bodoloḱ kana.',
 'accountcreated' => 'Ekaunṭ do teyarena',
@@ -403,15 +429,16 @@ You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other page
 or <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} search the related logs]</span>.',
 'previewnote' => "'''Disạyme noa do eken ńeln̕am lạgit.'''
 Amaḱ bodolaḱ kodo nit habićte bań ban̕cao akana!",
-'editing' => 'Sampadon; joṛao',
+'continue-editing' => 'Toṅge calaḱkana',
+'editing' => 'Joṛao do purạena: $1',
 'creating' => 'Benao',
 'editingsection' => 'Joṛao $1 (hạṭiń)',
 'editingcomment' => 'Joṛao',
 'yourtext' => 'Amaḱ ol',
-'templatesused' => 'Noa sakamre beoharen phormat se phormatko',
+'templatesused' => 'Noa sakamre beoharen {{PRURAL:$1 ṭempeleṭ ṭempeleṭko}}:',
 'template-protected' => 'Rukhiạ',
 'template-semiprotected' => '(Kạṭic-rukhiyạ)',
-'hiddencategories' => 'Noa sakam do mitṭen hoṛkanay',
+'hiddencategories' => 'Noa sakam do {{PLURAL:$1 1 ukuakan bhag $1 uku akan bhagkorenaḱ}} gaõtarenge:',
 'permissionserrorstext-withaction' => 'Amaḱ do aydạri bạnuḱtama, Noa karon pan̕jay lạgitte',
 'recreate-moveddeleted-warn' => "'''Sontorokme: am do arhõ doṛhate sakamem teyareda oka do sedayre get giḍiyen.
 Am do gunạnme cet́ noa joṛao kạmi am lạgit́te ganoḱ ase bań.
@@ -424,6 +451,9 @@ Get ar ocoḱ giḍi sakam do latarre emakan reference lạgit em hoena.',
 Thoṛa format do noare banuḱana.',
 'post-expand-template-inclusion-category' => 'Sakamko oka borḍre noa tahẽna ona doe paromkeda',
 
+# Account creation failure
+'cantcreateaccounttitle' => 'Ekaunṭ do baṅ tearlena',
+
 # History pages
 'viewpagelogs' => 'Noa sakam reaḱ cạbi udukme',
 'currentrev-asof' => 'Mucạt nãwã aroy',
@@ -441,16 +471,26 @@ Thoṛa format do noare banuḱana.',
 'history-show-deleted' => 'khạli get giḍiyaḱ koge',
 'histfirst' => "adi laha-ak'",
 'histlast' => 'Nahak',
+'historyempty' => '(banuḱa)',
 
 # Revision feed
 'history-feed-title' => 'Jạṛ nãwã aroy',
 'history-feed-item-nocomment' => 're',
 
 # Revision deletion
+'rev-deleted-user' => '(laṛcaṛić ńutum ocoḱena)',
 'rev-delundel' => 'ńeloḱ/danaṅ',
+'rev-showdeleted' => 'Uduḱme',
+'revisiondelete' => 'Get giḍi/nãwã aro baṅ getgiḍi',
+'revdelete-show-file-submit' => 'Hẽ',
+'revdelete-radio-same' => '(alom bodola)',
+'revdelete-radio-set' => 'Hẽ',
 'revdel-restore' => 'Judạ lekate ńel',
 'revdel-restore-deleted' => 'giḍikaḱ ńel ruạṛ',
 'revdel-restore-visible' => 'Ńeloḱ leka paṛhao ruạṛ',
+'pagehist' => 'Sakam reaḱ jạṛ',
+'deletedhist' => 'Get giḍi jạṛ',
+'revdelete-reasonotherlist' => 'Eṭaḱak karon',
 
 # Merge log
 'revertmerge' => 'bań mit́',
@@ -482,7 +522,7 @@ Thoṛa format do noare banuḱana.',
 'searchprofile-images-tooltip' => 'File sendra',
 'searchprofile-everything-tooltip' => 'Sanam ko modre sẽndra ( roṛ sakam modre hõ)',
 'searchprofile-advanced-tooltip' => 'Judạ ńutum re sẽndra',
-'search-result-size' => 'bạyiṭ aema bạyiṭ',
+'search-result-size' => '$1 ({{PLURAL:$2 1 Aṛaṅ$2 Aṛaṅko}})',
 'search-redirect' => '($1 te sujhi doṛha )',
 'search-section' => '(Pahaṭa $1)',
 'search-suggest' => 'Am do cet́ $1 em menocoyet tãhẽkana',
@@ -490,15 +530,65 @@ Thoṛa format do noare banuḱana.',
 'searchall' => 'Sanam',
 'showingresultsheader' => "'''$4'''  lạgit́ {{PLURAL:$5|Pho̠l ńamoḱ́akan - '''$1''' of '''$3'''|Pho̠l ńamoḱ́akan '''$1 - $2''' of '''$3'''}}",
 'search-nonefound' => 'Kupuli leka roṛruạṛ bạnuḱa',
+'powersearch-togglelabel' => 'Sendra',
+'powersearch-toggleall' => 'Sanamaḱ',
+'powersearch-togglenone' => 'Okaṭaḱ hõ baṅ',
+
+# Quickbar
+'qbsettings-none' => 'Okaṭaḱ hõ baṅ',
 
 # Preferences page
+'preferences' => 'Pạsindko',
 'mypreferences' => 'Iñaḱ pạsindko',
+'changepassword' => 'Uku nombor bodolme',
+'prefs-skin' => 'Harta',
+'skin-preview' => 'Ńel, Unuduḱ',
+'datedefault' => 'Pạsind banuḱa',
+'prefs-resetpass' => 'Uku nombor bodolme',
+'prefs-changeemail' => 'E-mail ṭhikạna bodolme',
+'prefs-setemail' => 'E-mail ṭhikana benaome',
+'saveprefs' => 'Rukhiyạymẽ',
+'resetprefs' => 'Baṅ rukhiyạaḱ ocogmẽ',
+'rows' => 'Sạrko:',
+'searchresultshead' => 'Sendra',
+'timezoneregion-africa' => 'Aphrika',
+'timezoneregion-america' => 'Amirika',
+'timezoneregion-asia' => 'Esiya',
+'prefs-files' => 'Rẽtko',
 'youremail' => 'E-mail:',
+'username' => 'Beoharićaḱ ńutum:',
+'uid' => 'Beoharićaḱ cinhạo nombor',
 'yourrealname' => 'Sạ̣ri ńutum',
+'gender-male' => 'Baba hoṛ',
+'gender-female' => 'Gogo hoṛ, Kuṛi, Kuṛi gidrạ',
+'email' => 'E-mail',
 'prefs-help-email' => 'E-mail ṭhikana do bạṛtitege, menkhan uku namber nãwãte benao jạruṛa, am do amaḱ uku nomborem hiṛiń keda.',
 'prefs-help-email-others' => 'Am são e-mail hotete jogajog dohoy lạgitte mitṭen joṛao se amaḱ katha roṛaḱ sakam bachao jońme.
 Amaḱ e-mail ṭhikạna do bań cabaḱa tinre onko do ko beohara',
 
+# User preference: e-mail validation using jQuery
+'email-address-validity-valid' => 'E-mail ṭhikạna do jewetge ńamena',
+'email-address-validity-invalid' => 'Amaḱ jewet e-mail ṭhkạna emmẽ',
+
+# User rights
+'userrights' => 'Beoharićaḱ laṛcaṛ ektiạrko',
+'userrights-lookup-user' => 'Beoharkoaḱ gãotako laṛcaṛ',
+'userrights-user-editname' => 'Beoharićaḱ ńutum emmẽ',
+'editusergroup' => 'Beoharićaḱ gãotako toṅgeymẽ',
+'userrights-editusergroup' => 'Beoharićaḱ gãotako toṅgeymẽ',
+'saveusergroups' => 'Beoharićaḱ gãotako rukhiyaymẽ',
+
+# Rights
+'right-edit' => 'Sakamko toṅge',
+'right-createpage' => 'Sakamko benoamẽ (Okako do galmarao sakamko baṅkan)',
+'right-createtalk' => 'Galmarao sakamko benaomẽ',
+'right-createaccount' => 'Nãwã beoharićaḱ ekaunṭ tearmẽ',
+'right-move' => 'Sakamko ocogmẽ',
+'right-move-subpages' => 'Sakam saõte kạtic sakamko ocogmẽ',
+'right-movefile' => 'Rẽtko ocogmẽ',
+'right-upload' => 'Rẽtko rakabmẽ',
+'right-delete' => 'Sakamko get giḍiymẽ',
+
 # Associated actions - in the sentence "You do not have permission to X"
 'action-edit' => 'noa sakam joṛao',
 
@@ -540,17 +630,34 @@ Amaḱ e-mail ṭhikạna do bań cabaḱa tinre onko do ko beohara',
 
 # Upload
 'upload' => 'Fael aploḍme',
+'uploadbtn' => 'Rẽt rakabmẽ',
 'uploadlogpage' => 'Chạbi do uthạome',
+'filename' => 'Rẽt ńutum',
 'filedesc' => 'Guṭ katha',
+'fileuploadsummary' => 'Guṭ katha',
+'savefile' => 'Rẽt rukhiyaymẽ',
 'uploadedimage' => 'Rakaṕ hoyena',
+'upload-description' => 'Rẽt reaḱ jạṛ',
+'watchthisupload' => 'Noa rẽt ńelmẽ',
+
+'upload-file-error' => 'Bhitri reaḱ bhul',
 
 'license' => 'Laisence benao',
 'license-header' => 'Laisense benao',
 
+# Special:ListFiles
+'imgfile' => 'Rẽt',
+'listfiles' => 'Rẽt reaḱ tạlika',
+'listfiles_date' => 'Tạrikh',
+'listfiles_name' => 'Ńutum',
+'listfiles_user' => 'Beoharić, Laṛcaṛic',
+
 # File description page
 'file-anchor-link' => 'Re̕t',
 'filehist' => 'Fael renaḱ Jạṛ',
 'filehist-help' => 'date re click me/somóy re click me fail reak obostha nel lagit',
+'filehist-deleteall' => 'Joto get giḍi',
+'filehist-deleteone' => 'Get giḍi',
 'filehist-revert' => 'Lahaleka',
 'filehist-current' => 'Nitaḱ',
 'filehist-datetime' => '̣Tạrikh/So̠mo̠y',
@@ -560,7 +667,7 @@ Amaḱ e-mail ṭhikạna do bań cabaḱa tinre onko do ko beohara',
 'filehist-dimensions' => 'Maṕ',
 'filehist-comment' => 'Roṛ',
 'imagelinks' => 'Fael bebohar',
-'linkstoimage' => 'Noa sakam do niạ rẽtre/fayel joṛao menaḱa',
+'linkstoimage' => 'Latar reaḱ {{PLURAL:}}$1 gan sakam gan sakam}} khon noa ret̃re joṛao menaḱa:',
 'nolinkstoimage' => 'Nonḍe do noa são joṛao sakam banuka',
 'sharedupload-desc-here' => 'Noa rẽt do nonḍe khon-  $1 ar paseć eṭaḱaḱ porjekṭko beoharakana.
 Noa reaḱ pasnao katha [$2 rẽt pasnao sakam] latare emena',
@@ -570,16 +677,23 @@ Noa reaḱ pasnao katha [$2 rẽt pasnao sakam] latare emena',
 
 # Statistics
 'statistics' => 'Halot',
+'statistics-pages' => 'Sakamko',
 
 'disambiguationspage' => 'sujhi',
 
 # Miscellaneous special pages
 'nbytes' => '$1 {{PLURAL:$1|baiṭ|baiṭ}}',
-'nmembers' => 'Sãoten/ Sãotenko',
+'nmembers' => '$1 {{PLURAL:$1 Gaõtaren Gaõtarenko',
 'prefixindex' => 'Sanam sakam re joṛao menaḱ',
+'shortpages' => 'Huḍiń sakamko',
+'longpages' => 'Jiliń sakamko',
+'listusers' => 'beoharićaḱ tạlika',
 'usercreated' => 'Ayo baba: tạrikh okte',
 'newpages' => 'Nãwa Patako',
+'newpages-username' => 'Beoharićaḱ ńutum:',
+'ancientpages' => 'Mare sakamko',
 'move' => 'Ocoḱme, Kulme',
+'movethispage' => 'Noa sakam ocogmẽ',
 
 # Book sources
 'booksources' => 'Puthi ńamoḱ ṭhại/jayga',
@@ -593,6 +707,8 @@ Noa reaḱ pasnao katha [$2 rẽt pasnao sakam] latare emena',
 'allpages' => 'joto sakam',
 'alphaindexline' => '$1 hạbić $2',
 'allarticles' => 'Sanam sakam',
+'allpagesprev' => 'Tayom sećaḱ',
+'allpagesnext' => 'Laha seć',
 'allpagessubmit' => 'Calaḱme',
 
 # Special:Categories
@@ -601,25 +717,49 @@ Noa reaḱ pasnao katha [$2 rẽt pasnao sakam] latare emena',
 # Special:LinkSearch
 'linksearch-line' => '$2 joṛao menaḱa $2re',
 
+# Special:ListUsers
+'listusers-submit' => 'Udugmẽ',
+'listusers-blocked' => '(Esetgea)',
+
 # Special:Log/newusers
 'newuserlogpage' => 'Laṛcaṛićaḱ tear cạbi',
 
 # Special:ListGroupRights
+'listgrouprights-group' => 'Gaõta',
+'listgrouprights-rights' => 'Ạidạriko',
+'listgrouprights-helppage' => 'Goṛo:Gaõta ạidạri',
 'listgrouprights-members' => 'Saõtenkoaḱ tạlika',
+'listgrouprights-addgroup-all' => 'Joto gaõtare ko soṅgekom',
+'listgrouprights-removegroup-all' => 'Joto gaõtaren ko ocoḱgiḍikom',
 
 # E-mail user
 'emailuser' => 'Nui beoharić e-mail emayme',
+'emailpage' => 'E-mail beoharić',
+'noemailtitle' => 'E-mail ṭhikạna do banuḱa',
+'emailusername' => 'Beoharićaḱ ńutum:',
+'emailusernamesubmit' => 'Em',
+'emailfrom' => 'Kulić:',
+'emailto' => 'Ńamić:',
+'emailmessage' => 'Mesag',
+'emailsend' => 'Kulmẽ',
 
 # Watchlist
 'watchlist' => "Inak' n'el ko",
 'mywatchlist' => 'Iñak jagarna tạlikạ',
-'watchlistfor2' => 'Lạgit',
+'watchlistfor2' => '$1 ($2) lạ̣gitte',
 'watch' => 'Ńelme',
 'unwatch' => "bang nelok' a",
 'wlshowlast' => 'Mucạt 1 ghonta mucạt 2 maha uduḱme',
 'watchlist-options' => 'Ńelok tạlika reak sonketko',
 
+# Displayed when you click the "watch" button and it is in the process of watching
+'watching' => 'Ńeloḱ kana...',
+
+'changed' => 'Bodolena',
+
 # Delete
+'deletepage' => 'Sakam get giḍikam',
+'delete-legend' => 'Get giḍi',
 'actioncomplete' => 'kami Chabae-ena',
 'actionfailed' => 'Kami bang hoe-lena',
 'dellogpage' => 'Mãrao log',
@@ -633,6 +773,11 @@ Noa reaḱ pasnao katha [$2 rẽt pasnao sakam] latare emena',
 'protectcomment' => 'karon',
 'protectexpiry' => 'Cabaḱ',
 
+# Restrictions (nouns)
+'restriction-edit' => 'Toṅge',
+'restriction-move' => 'Ocoḱmẽ, Kulmẽ',
+'restriction-create' => 'Tearmẽ, Benaomẽ',
+
 # Undelete
 'undeletelink' => 'Ńel/doho ruạṛ',
 'undeleteviewlink' => 'Ńel',
@@ -670,40 +815,60 @@ Noa reaḱ pasnao katha [$2 rẽt pasnao sakam] latare emena',
 'isredirect' => 'Bań sojhe sakam',
 'istemplate' => 'Ar mit́ teć sãote joṛao',
 'isimage' => 'Ret joṛao',
-'whatlinkshere-prev' => 'Tayom renaḱ Táoy renaḱko',
+'whatlinkshere-prev' => 'Laha renaḱ laha renaḱko',
 'whatlinkshere-next' => 'Laha renaḱ Laha renaḱko',
 'whatlinkshere-links' => 'Joṛaoko',
 'whatlinkshere-hideredirs' => '$1 acurgeya',
 'whatlinkshere-hidetrans' => 'Bodolaḱ danaṅ',
-'whatlinkshere-hidelinks' => 'Joṛao danaṅ se uduḱme',
-'whatlinkshere-hideimages' => 'phoṭo em',
+'whatlinkshere-hidelinks' => '$1 joṛao',
+'whatlinkshere-hideimages' => 'Chubi em',
 'whatlinkshere-filters' => 'Sapha',
 
 # Block/unblock
+'block' => 'Beoharić esedem',
+'blockip' => 'Beoharić esedem',
+'blockip-title' => 'Beoharić esedem',
+'blockip-legend' => 'Beoharić esedem',
 'ipboptions' => '2 Ghonṭa : 2 hours, 1 maha:1 day, 3 maha : 3 days,1 hapta :1 week, 2 hapta : 2 weeks, 1 cando :1 month, 3 cando : 3 months,6 cando :6 months,  1 serma :1 year,  Aemamaha : infinite',
 'ipblocklist' => 'Beoharic esetgeyay',
+'ipblocklist-submit' => 'Sendra',
+'emailblock' => 'E-mail do esetgea',
 'blocklink' => 'Eset',
 'unblocklink' => 'bań block',
 'change-blocklink' => 'block judạ',
 'contribslink' => 'em daṛeaḱ',
+'emaillink' => 'E-mail kulmẽ',
 'blocklogpage' => 'Tala eset',
 'blocklogentry' => 'Eset [[$1]] sãote cabaḱ okte oka do $2 $3',
 'block-log-flags-nocreate' => 'Ekaunṭ benao do bondogeya',
+'block-log-flags-noemail' => 'E-mail do esetgea',
+'block-log-flags-hiddenname' => 'Beoharićaḱ ńutum do ukugea',
+'blockme' => 'Esedińmẽ',
+'proxyblocksuccess' => 'Hoena',
 
 # Move page
+'movepagebtn' => 'Sakam ocogmẽ, Sakam kulmẽ',
+'pagemovedsub' => 'Ocogoḱ do hoena',
 'movelogpage' => 'Tala cạbi ocoḱme',
 'revertmove' => 'ruạr agu',
 
 # Export
 'export' => 'Aguyen sakamko',
+'export-addcat' => 'Joṛaomẽ',
+'export-addns' => 'Joṛaomẽ',
 
 # Namespace 8 related
 'allmessagesname' => 'Ńutum',
 'allmessagesdefault' => 'Bań bhul mesag ol',
+'allmessages-filter-all' => 'Sanamaḱ',
+'allmessages-filter-submit' => 'Calaḱmẽ',
 
 # Thumbnails
 'thumbnail-more' => 'Lạṭui mẽ',
 
+# Special:Import
+'import-upload-filename' => 'Rẽt ńutum',
+
 # Tooltip help for the actions
 'tooltip-pt-userpage' => 'Amak bebohar sakam',
 'tooltip-pt-mytalk' => 'Amaḱ katha ro̠ṛrenaḱ́ pata',
@@ -749,6 +914,7 @@ Ona te source em ńel daṛeaḱ',
 'tooltip-ca-nstab-project' => "project page nel' me",
 'tooltip-ca-nstab-image' => 'Fael sakam ńel',
 'tooltip-ca-nstab-template' => 'Forom uduḱme',
+'tooltip-ca-nstab-help' => 'Goṛo sakam ńelmẽ',
 'tooltip-ca-nstab-category' => 'Rokom sokom sakamko udukme',
 'tooltip-minoredit' => 'Noa do huḍiń joṛao lekate lekhay me',
 'tooltip-save' => 'Bodolaḱko rukhiyayme',
@@ -758,9 +924,14 @@ Ona te source em ńel daṛeaḱ',
 'tooltip-watch' => 'Amaḱ ńeloḱ sakamre noa do dohoyme',
 'tooltip-rollback' => '"Ghurlạ ạcur" noa sakam taṛam ruạṛ ńel sapha ona do amaḱ mũcạt́ mit́ dhom click re',
 'tooltip-undo' => 'Noa joṛao kạmire ulṭao "bạgiyaḱme" ar ńeloḱ lekate noa joṛao jhicme. Noa do am guḍ karon joṛaoe ektiyariye emama.',
+'tooltip-preferences-save' => 'Pạsindko rukhiyaymẽ',
 'tooltip-summary' => 'Khaṭote guṭ katha bhoraome',
 
+# Attribution
+'others' => 'Eṭagaḱko',
+
 # Info page
+'pageinfo-header-edits' => 'Toṅgeko',
 'pageinfo-header-watchlist' => 'Ńeloḱ tạlika',
 'pageinfo-header-views' => 'Ńelme',
 'pageinfo-subjectpage' => 'Sakam',
@@ -776,6 +947,9 @@ Ona te source em ńel daṛeaḱ',
 'file-nohires' => 'Aema resulation nondḍe banuḱa',
 'show-big-image' => 'Purạo resulation',
 
+# Special:NewFiles
+'ilsubmit' => 'Sendra',
+
 # Bad image list
 'bad_image_list' => 'Format do latar re leka',
 
@@ -792,6 +966,12 @@ f nombor
 isospeeddratings
 jeleń',
 
+# EXIF tags
+'exif-imagewidth' => 'Ganḍe',
+'exif-imagelength' => 'Usul',
+'exif-datetime' => 'Rẽt bodol reaḱ tạrikh ar okte',
+'exif-artist' => 'Onoliạ',
+
 # External editor support
 'edit-externally' => 'Noa rẽt tońge joṛao lạ̣gitte bahre reaḱ koejoń  beoharme',
 'edit-externally-help' => '(Nonḍe ńelme [//www.mediawiki.org/wiki/Manual:External_editors setup instructions] bạṛtite baḍay lạgit)',
index e756317..2f568e9 100644 (file)
@@ -668,6 +668,8 @@ Udaný dôvod: ''$2''.",
 'filereadonlyerror' => 'Nebolo možné modifikovať súbor „$1“, pretože úložisko „$2“ je momentálne v režime len na čítanie.
 
 Správca, ktorý ho zamkol ponúkol toto vysvetlenie: „$3“.',
+'invalidtitle-knownnamespace' => 'Neplatný názov s menným priestorom „$2“ a textom „$3“',
+'invalidtitle-unknownnamespace' => 'Neplatný názov s neznámym číslom menného priestoru „$1“ a textom „$2“',
 
 # Virus scanner
 'virus-badscanner' => "Chybná konfigurácia: neznámy antivírus: ''$1''",
@@ -1063,6 +1065,8 @@ Tieto argumenty boli vynechané.',
 'node-count-exceeded-warning' => 'Stránka prekročila povolený počet uzlov',
 'expansion-depth-exceeded-category' => 'Stránky s priveľkou hĺbkou expanzie',
 'expansion-depth-exceeded-warning' => 'Stránka prekročila povolenú hĺbku expanzie',
+'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)',
 
 # "Undo" feature
 '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.',
@@ -1239,6 +1243,8 @@ Uistite sa, že táto zmena zachová historickú kontinuitu zmien stránky.',
 
 # Diffs
 'history-title' => 'História revízií „$1“',
+'difference-title' => 'Rozdiel medzi revíziami „$1“',
+'difference-title-multipage' => 'Rozdiel medzi stránkami „$1“ a „$2“',
 'difference-multipage' => '(Rozdiel medzi stránkami)',
 'lineno' => 'Riadok $1:',
 'compareselectedversions' => 'Porovnať označené verzie',
@@ -1868,6 +1874,7 @@ Aby bolo zabezpečenie optimálne, img_auth.php je vypnutý.',
 'http-curl-error' => 'Chyba pri sťahovaní URL: $1',
 'http-host-unreachable' => 'URL nie je dostupný',
 'http-bad-status' => 'Počas požiadavky HTTP nastal problém: $1 $2',
+'http-truncated-body' => 'Telo požiadavky bolo prijaté iba čiastočne.',
 
 # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
 'upload-curl-error6' => 'Nedostupný URL',
@@ -2989,6 +2996,11 @@ Umožnuje do zhrnutia pridanie dôvodu.',
 'vector.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov štýlu Vector */',
 'print.css' => '/* Tu umiestnené CSS bude ovplyvňovať tlačový výstup */',
 'handheld.css' => '/* Tu umiestnené CSS bude ovplyvňovať prenosné zariadenia vychádzajúceho zo štýlu nastaveného v $wgHandheldStyle */',
+'noscript.css' => '/* Tu umiestnené CSS bude ovplyvňovať používateľov s vypnutým JavaScriptom */',
+'group-autoconfirmed.css' => '/* Tu umiestnené CSS bude ovplyvňovať iba používateľov s overenou emailovou adresou */',
+'group-bot.css' => '/* Tu umiestnené CSS bude ovplyvňovať iba robotov */',
+'group-sysop.css' => '/* Tu umiestnené CSS bude ovplyvňovať iba správcov */',
+'group-bureaucrat.css' => '/* Tu umiestnené CSS bude ovplyvňovať iba byrokratov */',
 
 # Scripts
 'common.js' => '/* Tu uvedený JavaScript sa nahrá všetkým používateľom pri každom nahraní stránky. */',
@@ -3001,6 +3013,10 @@ Umožnuje do zhrnutia pridanie dôvodu.',
 'simple.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Jednoduchý */',
 'modern.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Moderný */',
 'vector.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom vzhľadu Vector */',
+'group-autoconfirmed.js' => '/* Tu sa nachádzajúci JavaScript sa načíta používateľom s potvrdenou emailovou adresou */',
+'group-bot.js' => '/* Tu sa nachádzajúci JavaScript sa načíta len robotom */',
+'group-sysop.js' => '/* Tu sa nachádzajúci JavaScript sa načíta len správcom */',
+'group-bureaucrat.js' => '/* Tu sa nachádzajúci JavaScript sa načíta len byrokratom */',
 
 # Metadata
 'notacceptable' => 'Wiki server nedokáže poskytovať dáta vo formáte, v akom ich váš klient vie čítať.',
@@ -3048,6 +3064,7 @@ Pravdepodobne to spôsobil odkaz na externú internetovú lokalitu, ktorá sa na
 'skinname-chick' => 'Kuriatko',
 'skinname-simple' => 'Jednoduchý',
 'skinname-modern' => 'Moderný',
+'skinname-vector' => 'Vector',
 
 # Patrolling
 'markaspatrolleddiff' => 'Označiť ako stráženú',
index 9d77317..c02888a 100644 (file)
@@ -13,6 +13,7 @@
  * @author Kandar
  * @author Meursault2004
  * @author Mssetiadi
+ * @author Reedy
  * @author Urhixidur
  * @author לערי ריינהארט
  */
@@ -717,7 +718,7 @@ Alesanana ''\$2''.
 * Sasaran nudipeungpeuk : \$7
 
 Anjeun bisa nepungan \$1 atawa salasahiji [[{{MediaWiki:Grouppage-sysop}}|kuncén]] séjén pikeun nyawalakeun hal ieu.
-'''<u>Catet</u>''': yén anjeun teu bisa maké fungsi \"surélékan pamaké ieu\" mun anjeun teu ngadaptarkeun alamat surélék nu sah kana [[Special:Preferences|préferénsi pamaké]] anjeun.
+'''Catet''': yén anjeun teu bisa maké fungsi \"surélékan pamaké ieu\" mun anjeun teu ngadaptarkeun alamat surélék nu sah kana [[Special:Preferences|préferénsi pamaké]] anjeun.
 
 Alamat IP anjeun \$3 jeung ID na #\$5.
 Lampirkeun informasi ieu dina unggal ''query'' anjeun.",
index ae8577e..04dfcc8 100644 (file)
@@ -7,6 +7,7 @@
  * @ingroup Language
  * @file
  *
+ * @author Erdemaslancan
  * @author Ganbarzada
  * @author Tuzkozbir
  * @author Гусейн
@@ -619,6 +620,8 @@ $messages = array(
 # Undelete
 'undeletelink' => 'чәшику дәвонијеј/бәрпо кардеј',
 'undeleteviewlink' => 'тәмшо кардеј',
+'undelete-search-submit' => 'Нәве',
+'undelete-show-file-submit' => 'Бәле',
 
 # Namespace form on various pages
 'namespace' => 'Номон мәкон:',
@@ -743,6 +746,11 @@ $messages = array(
 'tooltip-undo' => 'Дәғандә дәгиши рәдд кардеј ијән "сыфтәнә нишо дој" окардеј, де ләғви сәбәби нышон дој имкони.',
 'tooltip-summary' => 'Кыртә тәсвир бынывыштән',
 
+# Info page
+'pageinfo-header-edits' => 'Сәрост кардеј',
+'pageinfo-header-views' => 'Тәмшо',
+'pageinfo-subjectpage' => 'Сәһифә',
+
 # Browsing diffs
 'previousdiff' => '← Навынәни дәгиши',
 'nextdiff' => 'Думотоно шә дәгиши →',
@@ -753,6 +761,9 @@ $messages = array(
 'svg-long-desc' => 'SVG фајл, номинәләдә $1 × $2 пиксел, фајли памјә: $3',
 'show-big-image' => 'Тикәјән јолә кејфијјәтинә шикил',
 
+# Special:NewFiles
+'ilsubmit' => 'Нәве',
+
 # Bad image list
 'bad_image_list' => 'Формат бәпе быбу жыго:
 
@@ -779,6 +790,10 @@ $messages = array(
 * gpslongitude
 * gpsaltitude',
 
+'exif-gaincontrol-0' => 'Ни',
+
+'exif-saturation-0' => 'Ади',
+
 # External editor support
 'edit-externally' => 'Редактә кардеј ым фајли де заһири програм',
 'edit-externally-help' => '(Бо мыффәссәлә мәлумотон бә [//www.mediawiki.org/wiki/Manual:External_editors дәрсәвон бо сохтәј] дијә быкан)',
@@ -796,6 +811,16 @@ $messages = array(
 # Core parser functions
 'duplicate-defaultsort' => '\'\'\'Дыггәт:\'\'\' Еһтимал кардә быә "$2" классификасијә ачари нафконә "$1" классификасијә ачари етиборсоз кардә',
 
+# Special:Version
+'version-entrypoints-header-url' => 'URL',
+
+# Special:FilePath
+'filepath-page' => 'Фајл:',
+'filepath-submit' => 'Давард',
+
+# Special:FileDuplicateSearch
+'fileduplicatesearch-submit' => 'Нәве',
+
 # Special:SpecialPages
 'specialpages' => 'Хысусиә сәһифон',
 
index 0221598..00b39e5 100644 (file)
@@ -36,6 +36,7 @@
  * @author Myildirim2007
  * @author Reedy
  * @author Runningfridgesrule
+ * @author Sadrettin
  * @author Srhat
  * @author Stultiwikia
  * @author Suelnur
@@ -987,6 +988,7 @@ Son engelleme günlüğü girdisi referans için aşağıda sağlanmıştır:',
 'note' => "'''Not: '''",
 'previewnote' => "'''Bunun yalnızca bir ön izleme olduğunu unutmayın.'''
 Yaptığınız değişiklikler henüz kaydedilmedi!",
+'continue-editing' => 'Düzenlemeye devam et',
 'previewconflict' => 'Bu önizleme metin düzenleme kutucuğunun üstünde, maddenin eğer değişikliklerinizi kaydetmeyi seçerseniz nasıl görüneceğini yansıtır.',
 'session_fail_preview' => 'Özür dileriz. Oturum açılması ile ilgili veri kaybından kaynaklı değişikliğinizi kaydedemedik. Lütfen tekrar deneyiniz. Eğer bu yöntem işe yaramazsa oturumu kapatıp tekrar sisteme geri giriş yapınız.',
 'session_fail_preview_html' => "'''Üzgünüz! Oturum verisinin kaybolmasından dolayı düzenlemenizi işleme geçiremeyeceğiz.'''
@@ -3234,6 +3236,8 @@ Diğerleri varsayılan olarak gizlenecektir.
 'exif-subjectnewscode' => 'Konu kodu',
 'exif-event' => 'Adı geçen olay',
 'exif-personinimage' => 'Adı geçen kişi',
+'exif-originalimageheight' => 'Resmin kırpılmadan önceki yükseliği',
+'exif-originalimagewidth' => 'Resmin kırpılmadan önceki genişliği',
 
 # EXIF attributes
 'exif-compression-1' => 'Sıkıştırılmamış',
@@ -3821,6 +3825,7 @@ Resimler tam çözünürlükte görüntülenir, diğer dosya tipleri ilgili prog
 'api-error-mustbeposted' => 'İç hata: İstek HTTP POST gerektiriyor.',
 'api-error-nomodule' => 'İç hata: Yükleme modülü ayarı yapılmadı.',
 'api-error-ok-but-empty' => 'İç hata: Sunucu yanıt vermiyor.',
+'api-error-overwrite' => 'Varolan dosyanın üzerine yazmaya izin verilmiyor.',
 'api-error-stashfailed' => 'İç hata: Sunucu, geçici dosyaları kaybetti.',
 'api-error-unclassified' => 'Bilinmeyen bir hata oluştu.',
 'api-error-unknown-code' => 'Bilinmeyen hata: "$1"',
@@ -3828,5 +3833,6 @@ Resimler tam çözünürlükte görüntülenir, diğer dosya tipleri ilgili prog
 'api-error-unknown-warning' => 'Bilinmeyen uyarı: $1',
 'api-error-unknownerror' => 'Bilinmeyen hata: "$1".',
 'api-error-uploaddisabled' => 'Yükleme bu vikide devre dışı bırakılmıştır.',
+'api-error-verification-error' => 'Dosya bozuk veya yanlış uzantıya sahip olabilir.',
 
 );
index ed3f4e3..aeff75c 100644 (file)
@@ -978,7 +978,7 @@ sửa đổi. Việc hủy bỏ này nhằm tránh nội dung trang bị hỏng.
 Điều này thường xảy ra khi bạn sử dụng một dịch vụ proxy vô danh trên web có vấn đề.'''",
 'edit_form_incomplete' => "'''Một số phần của biểu mẫu sửa đổi không tới được máy chủ. Hãy kiểm tra rằng các sửa đổi của bạn còn nguyên và thử lại.'''",
 'editing' => 'Sửa đổi $1',
-'creating' => 'Đang tạo $1',
+'creating' => 'Tạo $1',
 'editingsection' => 'Sửa đổi $1 (đề mục)',
 'editingcomment' => 'Sửa đổi $1 (đề mục mới)',
 'editconflict' => 'Sửa đổi mâu thuẫn: $1',
@@ -1240,6 +1240,8 @@ Xin hãy bảo đảm giữ vững tính liên tục của lịch sử trang.',
 
 # Diffs
 'history-title' => 'Lịch sử sửa đổi của “$1”',
+'difference-title' => 'Khác biệt giữa các bản “$1”',
+'difference-title-multipage' => 'Khác biệt giữa các trang “$1” và “$2”',
 'difference-multipage' => '(Khác biệt giữa các trang)',
 'lineno' => 'Dòng $1:',
 'compareselectedversions' => 'So sánh các bản đã chọn',
index 11d3087..9ed4222 100644 (file)
@@ -2167,7 +2167,7 @@ Kokkovõttõria pääle või kirotaq tagasivõtmisõ põhjusõ.',
 'scarytranscludetoolong' => "[Võrgoaadrõs om pall'o pikk]",
 
 # Delete conflict
-'deletedwhileediting' => "<center>'''Hoiatus''': taa leht om ärq kistutõt päält tuud, ku sa taad toimõndama naksit!</center>",
+'deletedwhileediting' => "'''Hoiatus''': taa leht om ärq kistutõt päält tuud, ku sa taad toimõndama naksit!",
 'confirmrecreate' => "Pruukja '''[[User:$1|$1]]''' ([[User talk:$1|arotus]]) kistut' taa lehe ärq päält tuud, ku sa naksit taad toimõndama. Põhjus oll':
 : ''$2''
 Olõq hää, kinnüdäq, et tahat taad lehte vahtsõst luvvaq.",
index 35f4196..d98603f 100644 (file)
@@ -3067,6 +3067,10 @@ $1',
 'exif-gpslongitude-e' => 'מזרח לענג',
 'exif-gpslongitude-w' => 'מערב לענג',
 
+# Pseudotags used for GPSAltitudeRef
+'exif-gpsaltitude-above-sealevel' => '$1 {{PLURAL:$1|ngמעטער|מעטער}} איבערן ים־שפיגלl',
+'exif-gpsaltitude-below-sealevel' => '$1 {{PLURAL:$1|מעטער|מעטער}} אונטערן ים־שפיגל',
+
 # Pseudotags used for GPSSpeedRef
 'exif-gpsspeed-k' => 'ק"מ אין א שעה',
 'exif-gpsspeed-m' => 'מייל פער שעה',
@@ -3311,6 +3315,7 @@ $5
 'version-software' => 'אינסטאַלירט ווייכוואַרג',
 'version-software-product' => 'פראדוקט',
 'version-software-version' => 'ווערסיע',
+'version-entrypoints-header-url' => 'URL',
 
 # Special:FilePath
 'filepath' => 'טעקע שטעג',
index 479498c..9f918b2 100644 (file)
@@ -983,6 +983,7 @@ $2
 'language-converter-depth-warning' => '字词转换器深度越限($1)',
 'node-count-exceeded-category' => '页面的节点数超出限制',
 'node-count-exceeded-warning' => '页面超出了节点数',
+'expansion-depth-exceeded-category' => '扩展深度超出限制的页面',
 
 # "Undo" feature
 'undo-success' => '此编辑可以被撤销。请检查以下比较以核实这正是您想做的,然后保存以下更改完成撤销编辑。',
index 10ccb87..bf5d0b0 100644 (file)
@@ -594,6 +594,8 @@ $2',
 'titleprotected' => "這個標題已經被[[User:$1|$1]]保護以防止建立。理由是''$2''。",
 'filereadonlyerror' => '無法修改文件" $1 "因為文件庫" $2 "處於唯讀模式。 !
 管理員鎖定它的解釋是:" $3 "。',
+'invalidtitle-knownnamespace' => '使用名字空間“$2”和文本“$3”的無效標題',
+'invalidtitle-unknownnamespace' => '使用未知名字空間編號$1和文本“$2”的無效標題',
 
 # Virus scanner
 'virus-badscanner' => "損壞設定: 未知的病毒掃瞄器: ''$1''",
@@ -967,7 +969,7 @@ $2
 'language-converter-depth-warning' => '已超過字詞轉換器深度限制($1)',
 'node-count-exceeded-category' => '頁面的節點數超出限制',
 'node-count-exceeded-warning' => '頁面超出節點數',
-'expansion-depth-exceeded-category' => '頁面的擴展深度超出限制',
+'expansion-depth-exceeded-category' => '擴展深度超出限制的頁面',
 'expansion-depth-exceeded-warning' => '頁面超出擴展深度',
 
 # "Undo" feature
@@ -1128,6 +1130,8 @@ $1",
 
 # Diffs
 'history-title' => '「$1」的修訂歷史',
+'difference-title' => '"$1"修訂版本之間的差異',
+'difference-title-multipage' => '"$1"和"$2"頁面之間的差異',
 'difference-multipage' => '(頁面間的差異)',
 'lineno' => '第$1行:',
 'compareselectedversions' => '比較選定的修訂版本',
@@ -1738,6 +1742,7 @@ $1',
 'http-curl-error' => '擷取URL時出錯:$1',
 'http-host-unreachable' => '無法到達URL。',
 'http-bad-status' => '進行HTTP請求時出現問題:$1 $2',
+'http-truncated-body' => '只收到部分請求的正文。',
 
 # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
 'upload-curl-error6' => '無法訪問 URL',
index 114297c..6c07858 100644 (file)
@@ -16,7 +16,7 @@ CREATE TABLE /*_*/filejournal (
   fj_new_sha1 varbinary(32) NOT NULL default '',
   -- Timestamp of the batch operation
   fj_timestamp varbinary(14) NOT NULL default ''
-);
+) /*$wgDBTableOptions*/;
 
 CREATE INDEX /*i*/fj_batch_id ON /*_*/filejournal (fj_batch_uuid);
 CREATE INDEX /*i*/fj_timestamp ON /*_*/filejournal (fj_timestamp);
diff --git a/maintenance/fileOpPerfTest.php b/maintenance/fileOpPerfTest.php
new file mode 100644 (file)
index 0000000..b16bd95
--- /dev/null
@@ -0,0 +1,135 @@
+<?php
+/**
+ * Maintenance script to test fileop performance
+ *
+ * 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
+ */
+
+$initialTime = microtime( true );
+$wgProfiler = array( 'class' => 'ProfilerSimpleText' );
+error_reporting( E_ALL );
+
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+
+class TestFileOpPerformance extends Maintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Test fileop performance";
+               $this->addOption( 'b1', 'Backend 1', true, true );
+               $this->addOption( 'b2', 'Backend 2', false, true );
+               $this->addOption( 'srcdir', 'File source directory', true, true );
+               $this->addOption( 'maxfiles', 'Max files', false, true );
+       }
+
+       public function execute() {
+               $backend = FileBackendGroup::singleton()->get( $this->getOption( 'b1' ) );
+               $this->doPerfTest( $backend );
+
+               if ( $this->getOption( 'b2' ) ) {
+                       $backend = FileBackendGroup::singleton()->get( $this->getOption( 'b2' ) );
+                       $this->doPerfTest( $backend );
+               }
+
+               $profiler = Profiler::instance();
+               $profiler->setTemplated( true );
+               $profiler->logData(); // prints
+       }
+
+       protected function doPerfTest( FileBackend $backend ) {
+               $ops1 = array();
+               $ops2 = array();
+               $ops3 = array();
+               $ops4 = array();
+               $ops5 = array();
+
+               $baseDir = 'mwstore://' . $backend->getName() . '/testing-cont1';
+               $backend->prepare( array( 'dir' => $baseDir ) );
+
+               $dirname = $this->getOption( 'srcdir' );
+               $dir = opendir( $dirname );
+               if ( !$dir ) {
+                       return;
+               }
+
+               while ( $dir && ( $file = readdir( $dir ) ) !== false ) {
+                       if ( $file[0] != '.' ) {
+                               $this->output( "Using '$dirname/$file' in operations.\n" );
+                               $dst = $baseDir . '/' . wfBaseName( $file );
+                               $ops1[] = array( 'op' => 'store', 'src' => "$dirname/$file", 'dst' => $dst, 'overwrite' => 1);
+                               $ops2[] = array( 'op' => 'copy', 'src' => "$dst", 'dst' => "$dst-1", 'overwrite' => 1);
+                               $ops3[] = array( 'op' => 'move', 'src' => $dst, 'dst' => "$dst-2", 'overwrite' => 1);
+                               $ops4[] = array( 'op' => 'delete', 'src' => "$dst-1", 'overwrite' => 1 );
+                               $ops5[] = array( 'op' => 'delete', 'src' => "$dst-2", 'overwrite' => 1 );
+                       }
+                       if ( count( $ops1 ) >= $this->getOption( 'maxfiles', 20 ) ) {
+                               break; // enough
+                       }
+               }
+               closedir( $dir );
+               $this->output( "\n" );
+
+               $start = microtime( true );
+               $status = $backend->doOperations( $ops1, array( 'force' => 1 ) );
+               $e = ( microtime( true ) - $start ) * 1000;
+               if ( $status->getErrorsArray() ) {
+                       print_r( $status->getErrorsArray() );
+                       exit(0);
+               }
+               $this->output( $backend->getName() . ": Stored " . count( $ops1 ) . " files in $e ms.\n" );
+
+               $start = microtime( true );
+               $backend->doOperations( $ops2, array( 'force' => 1 ) );
+               $e = ( microtime( true ) - $start ) * 1000;
+               if ( $status->getErrorsArray() ) {
+                       print_r( $status->getErrorsArray() );
+                       exit(0);
+               }
+               $this->output( $backend->getName() . ": Copied " . count( $ops2 ) . " files in $e ms.\n" );
+
+               $start = microtime( true );
+               $backend->doOperations( $ops3, array( 'force' => 1 ) );
+               $e = ( microtime( true ) - $start ) * 1000;
+               if ( $status->getErrorsArray() ) {
+                       print_r( $status->getErrorsArray() );
+                       exit(0);
+               }
+               $this->output( $backend->getName() . ": Moved " . count( $ops3 ) . " files in $e ms.\n" );
+
+               $start = microtime( true );
+               $backend->doOperations( $ops4, array( 'force' => 1 ) );
+               $e = ( microtime( true ) - $start ) * 1000;
+               if ( $status->getErrorsArray() ) {
+                       print_r( $status->getErrorsArray() );
+                       exit(0);
+               }
+               $this->output( $backend->getName() . ": Deleted " . count( $ops4 ) . " files in $e ms.\n" );
+
+               $start = microtime( true );
+               $backend->doOperations( $ops5, array( 'force' => 1 ) );
+               $e = ( microtime( true ) - $start ) * 1000;
+               if ( $status->getErrorsArray() ) {
+                       print_r( $status->getErrorsArray() );
+                       exit(0);
+               }
+               $this->output( $backend->getName() . ": Deleted " . count( $ops5 ) . " files in $e ms.\n" );
+       }
+}
+
+$maintClass = "TestFileOpPerformance";
+require_once( RUN_MAINTENANCE_IF_MAIN );
index c55b83d..6bf74b5 100644 (file)
@@ -1388,7 +1388,8 @@ $wgMessageStructure = array(
                'backend-fail-connect',
                'backend-fail-internal',
                'backend-fail-contenttype',
-               'backend-fail-batchsize'
+               'backend-fail-batchsize',
+               'backend-fail-usable'
        ),
 
        'filejournal-errors' => array(
diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php
new file mode 100644 (file)
index 0000000..0d5c9de
--- /dev/null
@@ -0,0 +1,236 @@
+<?php
+/**
+ * Sync one file backend to another based on the journal of later.
+ *
+ * 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
+ *
+ * @ingroup Maintenance
+ */
+
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+
+class SyncFileBackend extends Maintenance {
+       public function __construct() {
+               parent::__construct();
+               $this->mDescription = "Sync one file backend with another using the journal";
+               $this->addOption( 'src', 'Name of backend to sync from', true, true );
+               $this->addOption( 'dst', 'Name of destination backend to sync', true, true );
+               $this->addOption( 'start', 'Starting journal ID', false, true );
+               $this->addOption( 'end', 'Ending journal ID', false, true );
+               $this->addOption( 'posdir', 'Directory to read/record journal positions', false, true );
+               $this->addOption( 'verbose', 'Verbose mode', false, false, 'v' );
+               $this->setBatchSize( 50 );
+       }
+
+       public function execute() {
+               $src = FileBackendGroup::singleton()->get( $this->getOption( 'src' ) );
+               $dst = FileBackendGroup::singleton()->get( $this->getOption( 'dst' ) );
+
+               $posFile = $this->getOption( 'posdir' )
+                       ? $this->getOption( 'posdir' ) . '/' . wfWikiID()
+                       : false;
+
+               $start = $this->getOption( 'start', 0 );
+               if ( !$start && $posFile ) {
+                       $start = is_file( $posFile )
+                               ? (int)trim( file_get_contents( $posFile ) )
+                               : 0;
+                       ++$start; // we already did this ID, start with the next one
+                       $startFromPosFile = true;
+               } else {
+                       $startFromPosFile = false;
+               }
+               $end = $this->getOption( 'end', INF );
+
+               $this->output( "Synchronizing backend '{$dst->getName()}' to '{$src->getName()}'...\n" );
+               $this->output( "Starting journal position is $start.\n" );
+               if ( is_finite( $end ) ) {
+                       $this->output( "Ending journal position is $end.\n" );
+               }
+
+               // Actually sync the dest backend with the reference backend
+               $lastOKPos = $this->syncBackends( $src, $dst, $start, $end );
+
+               // Update the sync position file
+               if ( $startFromPosFile && $lastOKPos >= $start ) { // successfully advanced
+                       file_put_contents( $posFile, $lastOKPos, LOCK_EX );
+                       $this->output( "Updated journal position file.\n" );
+               }
+
+               if ( $lastOKPos === false ) {
+                       if ( !$start ) {
+                               $this->output( "No journal entries found.\n" );
+                       } else {
+                               $this->output( "No new journal entries found.\n" );
+                       }
+               } else {
+                       $this->output( "Stopped synchronization at journal position $lastOKPos.\n" );
+               }
+
+               if ( $this->isQuiet() ) {
+                       print $lastOKPos; // give a single machine-readable number
+               }
+       }
+
+       /**
+        * Sync $dst backend to $src backend based on the $src logs given after $start.
+        * Returns the journal entry ID this advanced to and handled (inclusive).
+        *
+        * @param $src FileBackend
+        * @param $dst FileBackend
+        * @param $start integer Starting journal position
+        * @param $end integer Starting journal position
+        * @return integer|false Journal entry ID or false if there are none
+        */
+       protected function syncBackends( FileBackend $src, FileBackend $dst, $start, $end ) {
+               $lastOKPos = 0; // failed
+               $first = true; // first batch
+
+               if ( $start > $end ) { // sanity
+                       $this->error( "Error: given starting ID greater than ending ID.", 1 );
+               }
+
+               do {
+                       $limit = min( $this->mBatchSize, $end - $start + 1 ); // don't go pass ending ID
+                       $this->output( "Doing id $start to " . ( $start + $limit - 1 ) . "...\n" );
+
+                       $entries = $src->getJournal()->getChangeEntries( $start, $limit, $next );
+                       $start = $next; // start where we left off next time
+                       if ( $first && !count( $entries ) ) {
+                               return false; // nothing to do
+                       }
+                       $first = false;
+
+                       $lastPosInBatch = 0;
+                       $pathsInBatch = array(); // changed paths
+                       foreach ( $entries as $entry ) {
+                               if ( $entry['op'] !== 'null' ) { // null ops are just for reference
+                                       $pathsInBatch[$entry['path']] = 1; // remove duplicates
+                               }
+                               $lastPosInBatch = $entry['id'];
+                       }
+
+                       $status = $this->syncFileBatch( array_keys( $pathsInBatch ), $src, $dst );
+                       if ( $status->isOK() ) {
+                               $lastOKPos = max( $lastOKPos, $lastPosInBatch );
+                       } else {
+                               $this->output( print_r( $status->getErrorsArray(), true ) );
+                               break; // no gaps; everything up to $lastPos must be OK
+                       }
+
+                       if ( !$start ) {
+                               $this->output( "End of journal entries.\n" );
+                       }
+               } while ( $start && $start <= $end );
+
+               return $lastOKPos;
+       }
+
+       /**
+        * Sync particular files of backend $src to the corresponding $dst backend files
+        *
+        * @param $paths Array
+        * @param $src FileBackend
+        * @param $dst FileBackend
+        * @return Status
+        */
+       protected function syncFileBatch( array $paths, FileBackend $src, FileBackend $dst ) {
+               $status = Status::newGood();
+               if ( !count( $paths ) ) {
+                       return $status; // nothing to do
+               }
+
+               // Source: convert internal backend names (FileBackendMultiWrite) to the public one
+               $sPaths = $this->replaceNamePaths( $paths, $src );
+               // Destination: get corresponding path name
+               $dPaths = $this->replaceNamePaths( $paths, $dst );
+
+               // Lock the live backend paths from modification
+               $sLock = $src->getScopedFileLocks( $sPaths, LockManager::LOCK_UW, $status );
+               $eLock = $dst->getScopedFileLocks( $dPaths, LockManager::LOCK_EX, $status );
+               if ( !$status->isOK() ) {
+                       return $status;
+               }
+
+               $ops = array();
+               $fsFiles = array();
+               foreach ( $sPaths as $i => $sPath ) {
+                       $dPath = $dPaths[$i]; // destination
+                       $sExists = $src->fileExists( array( 'src' => $sPath, 'latest' => 1 ) );
+                       if ( $sExists === true ) { // exists in source
+                               if ( $this->filesAreSame( $src, $dst, $sPath, $dPath ) ) {
+                                       continue; // avoid local copies for non-FS backends
+                               }
+                               // Note: getLocalReference() is fast for FS backends
+                               $fsFile = $src->getLocalReference( array( 'src' => $sPath, 'latest' => 1 ) );
+                               if ( !$fsFile ) {
+                                       $this->error( "Unable to sync '$dPath': could not get local copy." );
+                                       $status->fatal( 'backend-fail-internal', $src->getName() );
+                                       return $status;
+                               }
+                               $fsFiles[] = $fsFile; // keep TempFSFile objects alive as needed
+                               // Note: prepare() is usually fast for key/value backends
+                               $status->merge( $dst->prepare( array( 'dir' => dirname( $dPath ) ) ) );
+                               if ( !$status->isOK() ) {
+                                       return $status;
+                               }
+                               $ops[] = array( 'op' => 'store',
+                                       'src' => $fsFile->getPath(), 'dst' => $dPath, 'overwrite' => 1 );
+                       } elseif ( $sExists === false ) { // does not exist in source
+                               $ops[] = array( 'op' => 'delete', 'src' => $dPath, 'ignoreMissingSource' => 1 );
+                       } else { // error
+                               $this->error( "Unable to sync '$dPath': could not stat file." );
+                               $status->fatal( 'backend-fail-internal', $src->getName() );
+                               return $status;
+                       }
+               }
+
+               $status->merge( $dst->doOperations( $ops,
+                       array( 'nonLocking' => 1, 'nonJournaled' => 1 ) ) );
+               if ( $status->isOK() && $this->getOption( 'verbose' ) ) {
+                       $this->output( "Synchronized these file(s):\n" . implode( "\n", $dPaths ) . "\n" );
+               }
+
+               return $status;
+       }
+
+       /**
+        * Substitute the backend name of storage paths with that of a given one
+        *
+        * @param $paths Array|string List of paths or single string path
+        * @return Array|string
+        */
+       protected function replaceNamePaths( $paths, FileBackend $backend ) {
+               return preg_replace(
+                       '!^mwstore://([^/]+)!',
+                       StringUtils::escapeRegexReplacement( "mwstore://" . $backend->getName() ),
+                       $paths // string or array
+               );
+       }
+
+       protected function filesAreSame( FileBackend $src, FileBackend $dst, $sPath, $dPath ) {
+               return (
+                       ( $src->getFileSize( array( 'src' => $sPath ) )
+                               === $dst->getFileSize( array( 'src' => $dPath ) ) // short-circuit
+                       ) && ( $src->getFileSha1Base36( array( 'src' => $sPath ) )
+                               === $dst->getFileSha1Base36( array( 'src' => $dPath ) )
+                       )
+               );
+       }
+}
+
+$maintClass = "SyncFileBackend";
+require_once( RUN_MAINTENANCE_IF_MAIN );
index 0791711..8c6a411 100644 (file)
@@ -341,4 +341,65 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                wfDeprecated( $function );
                wfRestoreWarnings();
        }
+
+       /**
+        * Asserts that the given database query yields the rows given by $expectedRows.
+        * The expected rows should be given as indexed (not associative) arrays, with
+        * the values given in the order of the columns in the $fields parameter.
+        * Note that the rows are sorted by the columns given in $fields.
+        *
+        * @param $table String|Array the table(s) to query
+        * @param $fields String|Array the columns to include in the result (and to sort by)
+        * @param $condition String|Array "where" condition(s)
+        * @param $expectedRows Array - an array of arrays giving the expected rows.
+        *
+        * @throws MWException if this test cases's needsDB() method doesn't return true.
+        *         Test cases can use "@group Database" to enable database test support,
+        *         or list the tables under testing in $this->tablesUsed, or override the
+        *         needsDB() method.
+        */
+       protected function assertSelect( $table, $fields, $condition, Array $expectedRows ) {
+               if ( !$this->needsDB() ) {
+                       throw new MWException( 'When testing database state, the test cases\'s needDB()' .
+                               ' method should return true. Use @group Database or $this->tablesUsed.');
+               }
+
+               $db = wfGetDB( DB_SLAVE );
+
+               $res = $db->select( $table, $fields, $condition, array( 'ORDER BY' => $fields ) );
+               $this->assertNotEmpty( $res, "query failed: " . $db->lastError() );
+
+               $i = 0;
+
+               foreach ( $expectedRows as $expected ) {
+                       $r = $res->fetchRow();
+                       self::stripStringKeys( $r );
+
+                       $i += 1;
+                       $this->assertNotEmpty( $r, "row #$i missing" );
+
+                       $this->assertEquals( $expected, $r, "row #$i mismatches" );
+               }
+
+               $r = $res->fetchRow();
+               self::stripStringKeys( $r );
+
+               $this->assertFalse( $r, "found extra row (after #$i)" );
+       }
+
+       /**
+        * Utility function for eliminating all string keys from an array.
+        * Useful to turn a database result row as returned by fetchRow() into
+        * a pure indexed array.
+        *
+        * @static
+        * @param $r mixed the array to remove string keys from.
+        */
+       protected static function stripStringKeys( &$r ) {
+               if ( !is_array( $r ) ) return;
+
+               foreach ( $r as $k => $v ) {
+                       if ( is_string( $k ) ) unset( $r[$k] );
+               }
+       }
 }
index e38fa7e..f50b2fe 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
  * Tests for IP validity functions. Ported from /t/inc/IP.t by avar.
+ * @group IP
  */
 
 class IPTest extends MediaWikiTestCase {
@@ -505,4 +506,37 @@ class IPTest extends MediaWikiTestCase {
                        array( '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
+        */
+       function testPrettifyIP( $ip, $prettified ) {
+               $this->assertEquals( $prettified, IP::prettifyIP( $ip ), "Prettify of $ip" );
+       }
+
+       /**
+        * Provider for IP::testPrettifyIP()
+        */
+       function provideIPsToPrettify() {
+               return array(
+                       array( '0:0:0:0:0:0:0:0', '::' ),
+                       array( '0:0:0::0:0:0', '::' ),
+                       array( '0:0:0:1:0:0:0:0', '0:0:0:1::' ),
+                       array( '0:0::f', '::f' ),
+                       array( '0::0:0:0:33:fef:b', '::33:fef:b' ),
+                       array( '3f:535:0:0:0:0:e:fbb', '3f:535::e:fbb' ),
+                       array( '0:0:fef:0:0:0:e:fbb', '0:0:fef::e:fbb' ),
+                       array( 'abbc:2004::0:0:0:0', 'abbc:2004::' ),
+                       array( 'cebc:2004:f:0:0:0:0:0', 'cebc:2004:f::' ),
+                       array( '0:0:0:0:0:0:0:0/16', '::/16' ),
+                       array( '0:0:0::0:0:0/64', '::/64' ),
+                       array( '0:0::f/52', '::f/52' ),
+                       array( '::0:0:33:fef:b/52', '::33:fef:b/52' ),
+                       array( '3f:535:0:0:0:0:e:fbb/48', '3f:535::e:fbb/48' ),
+                       array( '0:0:fef:0:0:0:e:fbb/96', '0:0:fef::e:fbb/96' ),
+                       array( 'abbc:2004:0:0::0:0/40', 'abbc:2004::/40' ),
+                       array( 'aebc:2004:f:0:0:0:0:0/80', 'aebc:2004:f::/80' ),
+               );
+       }
 }
diff --git a/tests/phpunit/includes/LinksUpdateTest.php b/tests/phpunit/includes/LinksUpdateTest.php
new file mode 100644 (file)
index 0000000..4946200
--- /dev/null
@@ -0,0 +1,154 @@
+<?php
+
+/**
+ *
+ * @group Database
+ * ^--- make sure temporary tables are used.
+ */
+class LinksUpdateTest extends MediaWikiTestCase {
+
+       function  __construct( $name = null, array $data = array(), $dataName = '' ) {
+               parent::__construct( $name, $data, $dataName );
+
+               $this->tablesUsed = array_merge ( $this->tablesUsed,
+                                                                                       array( 'interwiki',
+
+                                                                                               'page_props',
+                                                                                               'pagelinks',
+                                                                                               'categorylinks',
+                                                                                               'langlinks',
+                                                                                               'externallinks',
+                                                                                               'imagelinks',
+                                                                                               'templatelinks',
+                                                                                               'iwlinks' ) );
+       }
+
+       function setUp() {
+               $dbw = wfGetDB( DB_MASTER );
+               $dbw->replace( 'interwiki',
+                                               array('iw_prefix'),
+                                               array( 'iw_prefix' => 'linksupdatetest',
+                                                      'iw_url' => 'http://testing.com/wiki/$1',
+                                                      'iw_api' => 'http://testing.com/w/api.php',
+                                                      'iw_local' => 0,
+                                                      'iw_trans' => 0,
+                                                      'iw_wikiid' => 'linksupdatetest',
+                                               ) );
+       }
+
+       protected function makeTitleAndParserOutput( $name, $id ) {
+               $t = Title::newFromText( $name );
+               $t->mArticleID = $id; # XXX: this is fugly
+
+               $po = new ParserOutput();
+               $po->setTitleText( $t->getPrefixedText() );
+
+               return array( $t, $po );
+       }
+
+       public function testUpdate_pagelinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->addLink( Title::newFromText( "Foo" ) );
+               $po->addLink( Title::newFromText( "Special:Foo" ) ); // special namespace should be ignored
+               $po->addLink( Title::newFromText( "linksupdatetest:Foo" ) ); // interwiki link should be ignored
+               $po->addLink( Title::newFromText( "#Foo" ) ); // hash link should be ignored
+
+               $this->assertLinksUpdate( $t, $po, 'pagelinks', 'pl_namespace, pl_title', 'pl_from = 111', array(
+                       array( NS_MAIN, 'Foo' ),
+               ) );
+
+               $po = new ParserOutput();
+               $po->setTitleText( $t->getPrefixedText() );
+
+               $po->addLink( Title::newFromText( "Bar" ) );
+
+               $this->assertLinksUpdate( $t, $po, 'pagelinks', 'pl_namespace, pl_title', 'pl_from = 111', array(
+                       array( NS_MAIN, 'Bar' ),
+               ) );
+       }
+
+       public function testUpdate_externallinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->addExternalLink( "http://testing.com/wiki/Foo" );
+
+               $this->assertLinksUpdate( $t, $po, 'externallinks', 'el_to, el_index', 'el_from = 111', array(
+                       array( 'http://testing.com/wiki/Foo', 'http://com.testing./wiki/Foo' ),
+               ) );
+       }
+
+       public function testUpdate_categorylinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->addCategory( "Foo", "FOO" );
+
+               $this->assertLinksUpdate( $t, $po, 'categorylinks', 'cl_to, cl_sortkey', 'cl_from = 111', array(
+                       array( 'Foo', "FOO\nTESTING" ),
+               ) );
+       }
+
+       public function testUpdate_iwlinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $target = Title::makeTitleSafe( NS_MAIN, "Foo", '', 'linksupdatetest' );
+               $po->addInterwikiLink( $target );
+
+               $this->assertLinksUpdate( $t, $po, 'iwlinks', 'iwl_prefix, iwl_title', 'iwl_from = 111', array(
+                       array( 'linksupdatetest', 'Foo' ),
+               ) );
+       }
+
+       public function testUpdate_templatelinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->addTemplate( Title::newFromText( "Template:Foo" ), 23, 42 );
+
+               $this->assertLinksUpdate( $t, $po, 'templatelinks', 'tl_namespace, tl_title', 'tl_from = 111', array(
+                       array( NS_TEMPLATE, 'Foo' ),
+               ) );
+       }
+
+       public function testUpdate_imagelinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->addImage( "Foo.png" );
+
+
+               $this->assertLinksUpdate( $t, $po, 'imagelinks', 'il_to', 'il_from = 111', array(
+                       array( 'Foo.png' ),
+               ) );
+       }
+
+       public function testUpdate_langlinks() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->addLanguageLink( Title::newFromText( "en:Foo" ) );
+
+
+               $this->assertLinksUpdate( $t, $po, 'langlinks', 'll_lang, ll_title', 'll_from = 111', array(
+                       array( 'En', 'Foo' ),
+               ) );
+       }
+
+       public function testUpdate_page_props() {
+               list( $t, $po ) = $this->makeTitleAndParserOutput( "Testing", 111 );
+
+               $po->setProperty( "foo", "bar" );
+
+               $this->assertLinksUpdate( $t, $po, 'page_props', 'pp_propname, pp_value', 'pp_page = 111', array(
+                       array( 'foo', 'bar' ),
+               ) );
+       }
+
+       #@todo: test recursive, too!
+
+       protected function assertLinksUpdate( Title $title, ParserOutput $parserOutput, $table, $fields, $condition, Array $expectedRows ) {
+               $update = new LinksUpdate( $title, $parserOutput );
+
+               $update->doUpdate();
+
+               $this->assertSelect( $table, $fields, $condition, $expectedRows );
+       }
+}
+
index 9c36a57..2a9608e 100644 (file)
@@ -7,7 +7,6 @@
 class FileBackendTest extends MediaWikiTestCase {
        private $backend, $multiBackend;
        private $filesToPrune = array();
-       private $dirsToPrune = array();
        private static $backendToUse;
 
        function setUp() {
@@ -35,6 +34,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        $this->singleBackend = new FSFileBackend( array(
                                'name'        => 'localtesting',
                                'lockManager' => 'fsLockManager',
+                               #'parallelize' => 'implicit',
                                'containerPaths' => array(
                                        'unittest-cont1' => "{$tmpPrefix}-localtesting-cont1",
                                        'unittest-cont2' => "{$tmpPrefix}-localtesting-cont2" )
@@ -43,6 +43,7 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->multiBackend = new FileBackendMultiWrite( array(
                        'name'        => 'localtesting',
                        'lockManager' => 'fsLockManager',
+                       'parallelize' => 'implicit',
                        'backends'    => array(
                                array(
                                        'name'          => 'localmutlitesting1',
@@ -220,9 +221,9 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation( $op );
 
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Store from $source to $dest succeeded without warnings ($backendName)." );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertEquals( true, $status->isOK(),
                        "Store from $source to $dest succeeded ($backendName)." );
                $this->assertEquals( array( 0 => true ), $status->success,
                        "Store from $source to $dest has proper 'success' field in Status ($backendName)." );
@@ -297,7 +298,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation(
                        array( 'op' => 'create', 'content' => 'blahblah', 'dst' => $source ) );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of file at $source succeeded ($backendName)." );
 
                if ( isset( $op['overwrite'] ) || isset( $op['overwriteSame'] ) ) {
@@ -306,7 +307,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation( $op );
 
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Copy from $source to $dest succeeded without warnings ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Copy from $source to $dest succeeded ($backendName)." );
@@ -385,7 +386,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation(
                        array( 'op' => 'create', 'content' => 'blahblah', 'dst' => $source ) );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of file at $source succeeded ($backendName)." );
 
                if ( isset( $op['overwrite'] ) || isset( $op['overwriteSame'] ) ) {
@@ -393,7 +394,7 @@ class FileBackendTest extends MediaWikiTestCase {
                }
 
                $status = $this->backend->doOperation( $op );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Move from $source to $dest succeeded without warnings ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Move from $source to $dest succeeded ($backendName)." );
@@ -473,13 +474,13 @@ class FileBackendTest extends MediaWikiTestCase {
                if ( $withSource ) {
                        $status = $this->backend->doOperation(
                                array( 'op' => 'create', 'content' => 'blahblah', 'dst' => $source ) );
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Creation of file at $source succeeded ($backendName)." );
                }
 
                $status = $this->backend->doOperation( $op );
                if ( $okStatus ) {
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Deletion of file at $source succeeded without warnings ($backendName)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Deletion of file at $source succeeded ($backendName)." );
@@ -555,13 +556,13 @@ class FileBackendTest extends MediaWikiTestCase {
                if ( $alreadyExists ) {
                        $status = $this->backend->doOperation(
                                array( 'op' => 'create', 'content' => $oldText, 'dst' => $dest ) );
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Creation of file at $dest succeeded ($backendName)." );
                }
 
                $status = $this->backend->doOperation( $op );
                if ( $okStatus ) {
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Creation of file at $dest succeeded without warnings ($backendName)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Creation of file at $dest succeeded ($backendName)." );
@@ -650,6 +651,54 @@ class FileBackendTest extends MediaWikiTestCase {
                return $cases;
        }
 
+       public function testDoQuickOperations() {
+               $this->backend = $this->singleBackend;
+               $this->doTestDoQuickOperations();
+               $this->tearDownFiles();
+
+               $this->backend = $this->multiBackend;
+               $this->doTestDoQuickOperations();
+               $this->tearDownFiles();
+       }
+
+       private function doTestDoQuickOperations() {
+               $backendName = $this->backendClass();
+
+               $base = $this->baseStorePath();
+               $files = array(
+                       "$base/unittest-cont1/fileA.a",
+                       "$base/unittest-cont1/fileB.a",
+                       "$base/unittest-cont1/fileC.a"
+               );
+               $ops = array();
+               $purgeOps = array();
+               foreach ( $files as $path ) {
+                       $status = $this->prepare( array( 'dir' => dirname( $path ) ) );
+                       $this->assertGoodStatus( $status,
+                               "Preparing $path succeeded without warnings ($backendName)." );
+                       $ops[] = array( 'op' => 'create', 'dst' => $path, 'content' => mt_rand(0,50000) );
+                       $purgeOps[] = array( 'op' => 'delete', 'src' => $path );
+               }
+               $purgeOps[] = array( 'op' => 'null' );
+               $status = $this->backend->doQuickOperations( $ops );
+               $this->assertGoodStatus( $status,
+                       "Creation of source files succeeded ($backendName)." );
+
+               foreach ( $files as $file ) {
+                       $this->assertTrue( $this->backend->fileExists( array( 'src' => $file ) ),
+                               "File $file exists." );
+               }
+
+               $status = $this->backend->doQuickOperations( $purgeOps );
+               $this->assertGoodStatus( $status,
+                       "Quick deletion of source files succeeded ($backendName)." );
+
+               foreach ( $files as $file ) {
+                       $this->assertFalse( $this->backend->fileExists( array( 'src' => $file ) ),
+                               "File $file purged." );
+               }
+       }
+
        /**
         * @dataProvider provider_testConcatenate
         */
@@ -685,7 +734,7 @@ class FileBackendTest extends MediaWikiTestCase {
                }
                $status = $this->backend->doOperations( $ops );
 
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of source files succeeded ($backendName)." );
 
                $dest = $params['dst'];
@@ -702,7 +751,7 @@ class FileBackendTest extends MediaWikiTestCase {
                // Combine the files into one
                $status = $this->backend->concatenate( $params );
                if ( $okStatus ) {
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Creation of concat file at $dest succeeded without warnings ($backendName)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Creation of concat file at $dest succeeded ($backendName)." );
@@ -802,7 +851,7 @@ class FileBackendTest extends MediaWikiTestCase {
                if ( $alreadyExists ) {
                        $this->prepare( array( 'dir' => dirname( $path ) ) );
                        $status = $this->backend->create( array( 'dst' => $path, 'content' => $content ) );
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Creation of file at $path succeeded ($backendName)." );
 
                        $size = $this->backend->getFileSize( array( 'src' => $path ) );
@@ -864,7 +913,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation(
                        array( 'op' => 'create', 'content' => $content, 'dst' => $source ) );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of file at $source succeeded ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Creation of file at $source succeeded with OK status ($backendName)." );
@@ -909,7 +958,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation(
                        array( 'op' => 'create', 'content' => $content, 'dst' => $source ) );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of file at $source succeeded ($backendName)." );
 
                $tmpFile = $this->backend->getLocalCopy( array( 'src' => $source ) );
@@ -952,7 +1001,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->doOperation(
                        array( 'op' => 'create', 'content' => $content, 'dst' => $source ) );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of file at $source succeeded ($backendName)." );
 
                $tmpFile = $this->backend->getLocalReference( array( 'src' => $source ) );
@@ -1001,7 +1050,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->prepare( array( 'dir' => dirname( $path ) ) );
                if ( $isOK ) {
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Preparing dir $path succeeded without warnings ($backendName)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Preparing dir $path succeeded ($backendName)." );
@@ -1012,7 +1061,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->clean( array( 'dir' => dirname( $path ) ) );
                if ( $isOK ) {
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Cleaning dir $path succeeded without warnings ($backendName)." );
                        $this->assertEquals( true, $status->isOK(),
                                "Cleaning dir $path succeeded ($backendName)." );
@@ -1032,7 +1081,7 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->tearDownFiles();
        }
 
-       function doTestRecursiveClean() {
+       private function doTestRecursiveClean() {
                $backendName = $this->backendClass();
 
                $base = $this->baseStorePath();
@@ -1052,7 +1101,7 @@ class FileBackendTest extends MediaWikiTestCase {
                );
                foreach ( $dirs as $dir ) {
                        $status = $this->prepare( array( 'dir' => $dir ) );
-                       $this->assertEquals( array(), $status->errors,
+                       $this->assertGoodStatus( $status,
                                "Preparing dir $dir succeeded without warnings ($backendName)." );
                }
 
@@ -1065,7 +1114,7 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $status = $this->backend->clean(
                        array( 'dir' => "$base/unittest-cont1", 'recursive' => 1 ) );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Recursive cleaning of dir $dir succeeded without warnings ($backendName)." );
 
                foreach ( $dirs as $dir ) {
@@ -1089,15 +1138,23 @@ class FileBackendTest extends MediaWikiTestCase {
 
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
-               $this->doTestDoOperationsFailing();
+               $this->doTestDoOperations2();
                $this->tearDownFiles();
 
                $this->backend = $this->multiBackend;
                $this->tearDownFiles();
+               $this->doTestDoOperations2();
+               $this->tearDownFiles();
+
+               $this->backend = $this->singleBackend;
+               $this->tearDownFiles();
                $this->doTestDoOperationsFailing();
                $this->tearDownFiles();
 
-               // @TODO: test some cases where the ops should fail
+               $this->backend = $this->multiBackend;
+               $this->tearDownFiles();
+               $this->doTestDoOperationsFailing();
+               $this->tearDownFiles();
        }
 
        private function doTestDoOperations() {
@@ -1148,7 +1205,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        // Does nothing
                ) );
 
-               $this->assertEquals( array(), $status->errors, "Operation batch succeeded" );
+               $this->assertGoodStatus( $status, "Operation batch succeeded" );
                $this->assertEquals( true, $status->isOK(), "Operation batch succeeded" );
                $this->assertEquals( 13, count( $status->success ),
                        "Operation batch has correct success array" );
@@ -1173,6 +1230,93 @@ class FileBackendTest extends MediaWikiTestCase {
                        "Correct file SHA-1 of $fileC" );
        }
 
+       // concurrency orientated
+       private function doTestDoOperations2() {
+               $base = $this->baseStorePath();
+
+               $fileAContents = '3tqtmoeatmn4wg4qe-mg3qt3 tq';
+               $fileBContents = 'g-jmq3gpqgt3qtg q3GT ';
+               $fileCContents = 'eigna[ogmewt 3qt g3qg flew[ag';
+
+               $tmpNameA = TempFSFile::factory( "unittests_", 'txt' )->getPath();
+               file_put_contents( $tmpNameA, $fileAContents );
+               $tmpNameB = TempFSFile::factory( "unittests_", 'txt' )->getPath();
+               file_put_contents( $tmpNameB, $fileBContents );
+               $tmpNameC = TempFSFile::factory( "unittests_", 'txt' )->getPath();
+               file_put_contents( $tmpNameC, $fileCContents );
+
+               $this->filesToPrune[] = $tmpNameA; # avoid file leaking
+               $this->filesToPrune[] = $tmpNameB; # avoid file leaking
+               $this->filesToPrune[] = $tmpNameC; # avoid file leaking
+
+               $fileA = "$base/unittest-cont1/a/b/fileA.txt";
+               $fileB = "$base/unittest-cont1/a/b/fileB.txt";
+               $fileC = "$base/unittest-cont1/a/b/fileC.txt";
+               $fileD = "$base/unittest-cont1/a/b/fileD.txt";
+
+               $this->prepare( array( 'dir' => dirname( $fileA ) ) );
+               $this->backend->create( array( 'dst' => $fileA, 'content' => $fileAContents ) );
+               $this->prepare( array( 'dir' => dirname( $fileB ) ) );
+               $this->prepare( array( 'dir' => dirname( $fileC ) ) );
+               $this->prepare( array( 'dir' => dirname( $fileD ) ) );
+
+               $status = $this->backend->doOperations( array(
+                       array( 'op' => 'store', 'src' => $tmpNameA, 'dst' => $fileA, 'overwriteSame' => 1 ),
+                       array( 'op' => 'store', 'src' => $tmpNameB, 'dst' => $fileB, 'overwrite' => 1 ),
+                       array( 'op' => 'store', 'src' => $tmpNameC, 'dst' => $fileC, 'overwrite' => 1 ),
+                       array( 'op' => 'copy', 'src' => $fileA, 'dst' => $fileC, 'overwrite' => 1 ),
+                       // Now: A:<A>, B:<B>, C:<A>, D:<empty> (file:<orginal contents>)
+                       array( 'op' => 'copy', 'src' => $fileC, 'dst' => $fileA, 'overwriteSame' => 1 ),
+                       // Now: A:<A>, B:<B>, C:<A>, D:<empty>
+                       array( 'op' => 'move', 'src' => $fileC, 'dst' => $fileD, 'overwrite' => 1 ),
+                       // Now: A:<A>, B:<B>, C:<empty>, D:<A>
+                       array( 'op' => 'move', 'src' => $fileB, 'dst' => $fileC ),
+                       // Now: A:<A>, B:<empty>, C:<B>, D:<A>
+                       array( 'op' => 'move', 'src' => $fileD, 'dst' => $fileA, 'overwriteSame' => 1 ),
+                       // Now: A:<A>, B:<empty>, C:<B>, D:<empty>
+                       array( 'op' => 'move', 'src' => $fileC, 'dst' => $fileA, 'overwrite' => 1 ),
+                       // Now: A:<B>, B:<empty>, C:<empty>, D:<empty>
+                       array( 'op' => 'copy', 'src' => $fileA, 'dst' => $fileC ),
+                       // Now: A:<B>, B:<empty>, C:<B>, D:<empty>
+                       array( 'op' => 'move', 'src' => $fileA, 'dst' => $fileC, 'overwriteSame' => 1 ),
+                       // Now: A:<empty>, B:<empty>, C:<B>, D:<empty>
+                       array( 'op' => 'copy', 'src' => $fileC, 'dst' => $fileC, 'overwrite' => 1 ),
+                       // Does nothing
+                       array( 'op' => 'copy', 'src' => $fileC, 'dst' => $fileC, 'overwriteSame' => 1 ),
+                       // Does nothing
+                       array( 'op' => 'move', 'src' => $fileC, 'dst' => $fileC, 'overwrite' => 1 ),
+                       // Does nothing
+                       array( 'op' => 'move', 'src' => $fileC, 'dst' => $fileC, 'overwriteSame' => 1 ),
+                       // Does nothing
+                       array( 'op' => 'null' ),
+                       // Does nothing
+               ) );
+
+               $this->assertGoodStatus( $status, "Operation batch succeeded" );
+               $this->assertEquals( true, $status->isOK(), "Operation batch succeeded" );
+               $this->assertEquals( 16, count( $status->success ),
+                       "Operation batch has correct success array" );
+
+               $this->assertEquals( false, $this->backend->fileExists( array( 'src' => $fileA ) ),
+                       "File does not exist at $fileA" );
+               $this->assertEquals( false, $this->backend->fileExists( array( 'src' => $fileB ) ),
+                       "File does not exist at $fileB" );
+               $this->assertEquals( false, $this->backend->fileExists( array( 'src' => $fileD ) ),
+                       "File does not exist at $fileD" );
+
+               $this->assertEquals( true, $this->backend->fileExists( array( 'src' => $fileC ) ),
+                       "File exists at $fileC" );
+               $this->assertEquals( $fileBContents,
+                       $this->backend->getFileContents( array( 'src' => $fileC ) ),
+                       "Correct file contents of $fileC" );
+               $this->assertEquals( strlen( $fileBContents ),
+                       $this->backend->getFileSize( array( 'src' => $fileC ) ),
+                       "Correct file size of $fileC" );
+               $this->assertEquals( wfBaseConvert( sha1( $fileBContents ), 16, 36, 31 ),
+                       $this->backend->getFileSha1Base36( array( 'src' => $fileC ) ),
+                       "Correct file SHA-1 of $fileC" );
+       }
+
        private function doTestDoOperationsFailing() {
                $base = $this->baseStorePath();
 
@@ -1275,7 +1419,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        $ops[] = array( 'op' => 'create', 'content' => 'xxy', 'dst' => $file );
                }
                $status = $this->backend->doOperations( $ops );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of files succeeded ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Creation of files succeeded with OK status ($backendName)." );
@@ -1428,7 +1572,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        $ops[] = array( 'op' => 'create', 'content' => 'xxy', 'dst' => $file );
                }
                $status = $this->backend->doOperations( $ops );
-               $this->assertEquals( array(), $status->errors,
+               $this->assertGoodStatus( $status,
                        "Creation of files succeeded ($backendName)." );
                $this->assertEquals( true, $status->isOK(),
                        "Creation of files succeeded with OK status ($backendName)." );
@@ -1624,7 +1768,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        // test helper wrapper for backend prepare() function
        private function prepare( array $params ) {
-               $this->dirsToPrune[] = $params['dir'];
                return $this->backend->prepare( $params );
        }
 
@@ -1636,10 +1779,7 @@ class FileBackendTest extends MediaWikiTestCase {
                foreach ( $containers as $container ) {
                        $this->deleteFiles( $container );
                }
-               foreach ( $this->dirsToPrune as $dir ) {
-                       $this->recursiveClean( $dir );
-               }
-               $this->filesToPrune = $this->dirsToPrune = array();
+               $this->filesToPrune = array();
        }
 
        private function deleteFiles( $container ) {
@@ -1651,14 +1791,11 @@ class FileBackendTest extends MediaWikiTestCase {
                                        array( 'force' => 1, 'nonLocking' => 1 ) );
                        }
                }
+               $this->backend->clean( array( 'dir' => "$base/$container", 'recursive' => 1 ) );
        }
 
-       private function recursiveClean( $dir ) {
-               do {
-                       if ( !$this->backend->clean( array( 'dir' => $dir ) )->isOK() ) {
-                               break;
-                       }
-               } while ( $dir = FileBackend::parentStoragePath( $dir ) );
+       function assertGoodStatus( $status, $msg ) {
+               $this->assertEquals( print_r( array(), 1 ), print_r( $status->errors, 1 ), $msg );
        }
 
        function tearDown() {
index f4baf95..f3176ab 100644 (file)
@@ -84,38 +84,17 @@ if ( QUnit.urlParams.completenesstest ) {
 QUnit.config.urlConfig.push( 'mwlogenv' );
 
 /**
- * Reset mw.config to a fresh copy of the live config for each test();
- * @param override {Object} [optional]
- * @example:
- * <code>
- * module( .., newMwEnvironment() );
- *
- * test( .., function () {
- *     mw.config.set( 'foo', 'bar' ); // just for this test
- * } );
- *
- * test( .., function () {
- *     mw.config.get( 'foo' ); // doesn't exist
- * } );
- *
- *
- * module( .., newMwEnvironment({ quux: 'corge' }) );
- *
- * test( .., function () {
- *     mw.config.get( 'quux' ); // "corge"
- *     mw.config.set( 'quux', "grault" );
- * } );
- *
- * test( .., function () {
- *     mw.config.get( 'quux' ); // "corge"
- * } );
+ * Reset mw.config and others to a fresh copy of the live config for each test(),
+ * and restore it back to the live one afterwards.
+ * @param localEnv {Object} [optional]
+ * @example (see test suite at the bottom of this file)
  * </code>
  */
 QUnit.newMwEnvironment = ( function () {
-       var log, liveConfig, liveMsgs;
+       var log, liveConfig, liveMessages;
 
        liveConfig = mw.config.values;
-       liveMsgs = mw.messages.values;
+       liveMessages = mw.messages.values;
 
        function freshConfigCopy( custom ) {
                // "deep=true" is important here.
@@ -123,34 +102,46 @@ QUnit.newMwEnvironment = ( function () {
                // e.g. mw.config.set( 'wgFileExtensions', [] ) would not effect liveConfig,
                // but mw.config.get( 'wgFileExtensions' ).push( 'png' ) would as the array
                // was passed by reference in $.extend's loop.
-               return $.extend({}, liveConfig, custom, /*deep=*/true );
+               return $.extend( {}, liveConfig, custom, /*deep=*/true );
        }
 
-       function freshMsgsCopy( custom ) {
-               return $.extend({}, liveMsgs, custom, /*deep=*/true );
+       function freshMessagesCopy( custom ) {
+               return $.extend( {}, liveMessages, custom, /*deep=*/true );
        }
 
        log = QUnit.urlParams.mwlogenv ? mw.log : function () {};
 
-       return function ( overrideConfig, overrideMsgs ) {
-               overrideConfig = overrideConfig || {};
-               overrideMsgs = overrideMsgs || {};
+       return function ( localEnv ) {
+               localEnv = $.extend( {
+                       // QUnit
+                       setup: $.noop,
+                       teardown: $.noop,
+                       // MediaWiki
+                       config: {},
+                       messages: {}
+               }, localEnv );
 
                return {
                        setup: function () {
                                log( 'MwEnvironment> SETUP    for "' + QUnit.config.current.module
                                        + ': ' + QUnit.config.current.testName + '"' );
+
                                // Greetings, mock environment!
-                               mw.config.values = freshConfigCopy( overrideConfig );
-                               mw.messages.values = freshMsgsCopy( overrideMsgs );
+                               mw.config.values = freshConfigCopy( localEnv.config );
+                               mw.messages.values = freshMessagesCopy( localEnv.messages );
+
+                               localEnv.setup()
                        },
 
                        teardown: function () {
                                log( 'MwEnvironment> TEARDOWN for "' + QUnit.config.current.module
                                        + ': ' + QUnit.config.current.testName + '"' );
+
+                               localEnv.teardown();
+
                                // Farewell, mock environment!
                                mw.config.values = liveConfig;
-                               mw.messages.values = liveMsgs;
+                               mw.messages.values = liveMessages;
                        }
                };
        };
@@ -200,4 +191,59 @@ addons = {
 $.extend( QUnit, addons );
 $.extend( window, addons );
 
+/**
+ * Small test suite to confirm proper functionality of the utilities and
+ * initializations in this file.
+ */
+var envExecCount = 0;
+module( 'mediawiki.tests.qunit.testrunner', QUnit.newMwEnvironment({
+       setup: function () {
+               envExecCount += 1;
+               this.mwHtmlLive = mw.html;
+               mw.html = {
+                       escape: function () {
+                               return 'mocked-' + envExecCount;
+                       }
+               };
+       },
+       teardown: function () {
+               mw.html = this.mwHtmlLive;
+       },
+       config: {
+               testVar: 'foo'
+       },
+       messages: {
+               testMsg: 'Foo.'
+       }
+}) );
+
+test( 'Setup', function () {
+       expect( 3 );
+
+       equal( mw.html.escape( 'foo' ), 'mocked-1', 'extra setup() callback was ran.' );
+       equal( mw.config.get( 'testVar' ), 'foo', 'config object applied' );
+       equal( mw.messages.get( 'testMsg' ), 'Foo.', 'messages object applied' );
+
+       mw.config.set( 'testVar', 'bar' );
+       mw.messages.set( 'testMsg', 'Bar.' );
+});
+
+test( 'Teardown', function () {
+       expect( 3 );
+
+       equal( mw.html.escape( 'foo' ), 'mocked-2', 'extra setup() callback was re-ran.' );
+       equal( mw.config.get( 'testVar' ), 'foo', 'config object restored and re-applied after test()' );
+       equal( mw.messages.get( 'testMsg' ), 'Foo.', 'messages object restored and re-applied after test()' );
+});
+
+module( 'mediawiki.tests.qunit.testrunner-after', QUnit.newMwEnvironment() );
+
+test( 'Teardown', function () {
+       expect( 3 );
+
+       equal( mw.html.escape( '<' ), '&lt;', 'extra teardown() callback was ran.' );
+       equal( mw.config.get( 'testVar' ), null, 'config object restored to live in next module()' );
+       equal( mw.messages.get( 'testMsg' ), null, 'messages object restored to live in next module()' );
+});
+
 })( jQuery, mediaWiki, QUnit );
index 95284c7..f028dbc 100644 (file)
@@ -7,7 +7,7 @@ var config = {
        wgContentLanguage: 'en'
 };
 
-module( 'jquery.tablesorter', QUnit.newMwEnvironment( config ) );
+module( 'jquery.tablesorter', QUnit.newMwEnvironment({ config: config }) );
 
 test( '-- Initial check', function() {
        expect(1);
index e04111f..7ff0fb8 100644 (file)
@@ -55,7 +55,7 @@ var config = {
        "wgCaseSensitiveNamespaces": []
 };
 
-module( 'mediawiki.Title', QUnit.newMwEnvironment( config ) );
+module( 'mediawiki.Title', QUnit.newMwEnvironment({ config: config }) );
 
 test( '-- Initial check', function () {
        expect(1);
index 552e69e..b834aeb 100644 (file)
@@ -3,10 +3,11 @@ module( 'mediawiki.Uri', QUnit.newMwEnvironment() );
 test( '-- Initial check', function () {
        expect( 2 );
 
-       // Ensure we have a generic URI parser if not running in a browser
-       if ( !mw.Uri ) {
-               mw.Uri = mw.UriRelative( 'http://example.com/' );
-       }
+       // Ensure we have a generic mw.Uri constructor. By default mediawiki.uri,
+       // will use the currrent window ocation as base. But for testing we need
+       // to have a generic one, so that it doens't return false negatives if
+       // we run the test suite from an https server.
+       mw.Uri = mw.UriRelative( 'http://example.org/w/index.php' );
 
        ok( mw.UriRelative, 'mw.UriRelative defined' );
        ok( mw.Uri, 'mw.Uri defined' );