r93090 : Make summaries more modular, Siebrand says there'll be problems with transla...
authorLeo Koppelkamm <diebuche@users.mediawiki.org>
Tue, 26 Jul 2011 15:50:43 +0000 (15:50 +0000)
committerLeo Koppelkamm <diebuche@users.mediawiki.org>
Tue, 26 Jul 2011 15:50:43 +0000 (15:50 +0000)
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc
resources/mediawiki.page/mediawiki.page.ajaxCategories.js

index b5f4287..3ef7ddc 100644 (file)
@@ -4611,11 +4611,10 @@ This site is experiencing technical difficulties.',
 'ajax-confirm-save-all'         => 'Save all changes',
 'ajax-cancel'                   => 'Cancel edit',
 'ajax-cancel-all'               => 'Cancel all changes',
-'ajax-add-category-summary'     => 'add category "$1"',
-'ajax-edit-category-summary'    => 'change category "$1" to "$2"',
-'ajax-remove-category-summary'  => 'remove category "$1"',
-'ajax-category-question'        => '<strong>Why</strong> do you want to $1?',
-'ajax-category-and'             => ' and ',
+'ajax-add-category-summary'     => 'Add category "$1"',
+'ajax-edit-category-summary'    => 'Change category "$1" to "$2"',
+'ajax-remove-category-summary'  => 'Remove category "$1"',
+'ajax-category-question'        => 'Why do you want to make the following changes:',
 'ajax-error-title'              => 'Error',
 'ajax-remove-category-error'    => 'It was not possible to remove category "$1".
 This usually occurs when the category has been added to the page in a template.',
index b686776..73afce8 100644 (file)
@@ -4246,13 +4246,10 @@ Refers to the specific category. "Remove this category" is also correct.',
 'ajax-confirm-title'            => 'Title for a dialog box in which the user is asked for an edit summary',
 'ajax-confirm-save'             => 'Submit button {{Identical|Save}}',
 'ajax-confirm-save-all'         => 'Submit button to save all changes',
-'ajax-add-category-summary'     => 'See {{msg-mw|ajax-category-question}}. $1 is a category name. This is used inside a sentence, make sure that the case is correct.',
-'ajax-edit-category-summary'    => 'See {{msg-mw|ajax-category-question}}. $1 and $2 are both category names. This is used inside a sentence, make sure that the case is correct.',
-'ajax-remove-category-summary'  => 'See {{msg-mw|ajax-category-question}}. $1 is a category name. This is used inside a sentence, make sure that the case is correct.',
-'ajax-category-question'        => 'Question the user is asked before submit. $1 is filled with a list of one or more of the following messages; 
-{{msg-mw|ajax-add-category-summary}}, {{msg-mw|ajax-remove-category-summary}}, {{msg-mw|ajax-edit-category-summary}}. 
-The last of the inserted messages is prefaced by {{msg-mw|ajax-category-and}}. The result would be something like:
-Why do you want to remove Category:A and add Category:C ?',
+'ajax-add-category-summary'     => 'See {{msg-mw|ajax-category-question}}. $1 is a category name.',
+'ajax-edit-category-summary'    => 'See {{msg-mw|ajax-category-question}}. $1 and $2 are both category names.',
+'ajax-remove-category-summary'  => 'See {{msg-mw|ajax-category-question}}. $1 is a category name. ',
+'ajax-category-question'        => 'Question the user is asked before submit. It\'s followed by a list of the changes.',
 'ajax-category-and'             => 'Used to join multiple list items. Eg. "Edit foo, move bar and add foobar"',
 'ajax-error-title'              => '{{Identical|Error}}',
 'ajax-category-already-present' => 'Error message. $1 is the category name',
index 58d8e24..e0e56fd 100644 (file)
@@ -3487,7 +3487,6 @@ $wgMessageStructure = array(
                'ajax-edit-category-summary',
                'ajax-remove-category-summary',
                'ajax-category-question',
-               'ajax-category-and',
                'ajax-error-title',
                'ajax-remove-category-error',
                'ajax-edit-category-error',
index 86e8947..2429115 100644 (file)
@@ -328,7 +328,7 @@ mw.ajaxCategories = function( options ) {
 
                // Summary of the action to be taken
                var summaryHolder = $( '<p/>' );
-               summaryHolder.html( mw.msg( 'ajax-category-question', actionSummary ) );
+               summaryHolder.html( '<strong>' + mw.msg( 'ajax-category-question' ) + '</strong><br>' + actionSummary );
                dialog.append( summaryHolder );
 
                // Reason textbox.
@@ -388,13 +388,8 @@ mw.ajaxCategories = function( options ) {
                        _saveAllButton.hide();
                        _cancelAllButton.hide();
                        return;
-               } else if ( summary.length == 1 ) {
-                       summary = summary.pop();
                } else {
-                       var lastSummary = summary.pop();
-                       summary = summary.join( ', ');
-                       summary += mw.msg( 'ajax-category-and' ) + lastSummary;
-                       summary = summary.substring( 0, summary.length - 2 );
+                       summary = summary.join( '<br>' );
                }
                // Remove "holes" in array
                summaryShort = $.grep( _stash.shortSum, function( n,i ) {
@@ -417,7 +412,7 @@ mw.ajaxCategories = function( options ) {
                };
                var doneFn = function() { that.resetAll( true ); };
 
-               that._confirmEdit( combinedFn, summary, shortSummary, doneFn, '', 'all' );
+               that._confirmEdit( combinedFn, summary, summaryShort, doneFn, '', 'all' );
        };
 
        /**