Fix transaction-duration-limit-exceeded
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sat, 19 Dec 2015 21:23:18 +0000 (23:23 +0200)
committerAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sat, 19 Dec 2015 21:23:18 +0000 (23:23 +0200)
* Fix the wording.
* Add PLURAL support.

Bug: T121821
Change-Id: I9cf27534a5b7a055a7c2544f6366dd0e40c5e9a3

includes/MediaWiki.php
languages/i18n/en.json

index fcd425d..be0073d 100644 (file)
@@ -548,7 +548,7 @@ class MediaWiki {
                                if ( $limit > 0 && $time > $limit ) {
                                        throw new DBTransactionError(
                                                $db,
-                                               wfMessage( 'transaction-duration-limit-exceeded', $time, $limit )->plain()
+                                               wfMessage( 'transaction-duration-limit-exceeded', $time, $limit )->text()
                                        );
                                }
                        } );
index 60f6645..5603100 100644 (file)
        "databaseerror-query": "Query: $1",
        "databaseerror-function": "Function: $1",
        "databaseerror-error": "Error: $1",
-       "transaction-duration-limit-exceeded": "In order to avoid creating high replication lag, this transaction was aborted because the write duration ($1) exceeded the $2 second limit.\nIf you are changing many items at once, trying doing multiple smaller operations instead.",
+       "transaction-duration-limit-exceeded": "To avoid creating high replication lag, this transaction was aborted because the write duration ($1) exceeded the $2 {{PLURAL:$2|second|seconds}} limit.\nIf you are changing many items at once, try doing multiple smaller operations instead.",
        "laggedslavemode": "<strong>Warning:</strong> Page may not contain recent updates.",
        "readonly": "Database locked",
        "enterlockreason": "Enter a reason for the lock, including an estimate of when the lock will be released",