From: Leo Koppelkamm Date: Tue, 26 Jul 2011 15:50:43 +0000 (+0000) Subject: r93090 : Make summaries more modular, Siebrand says there'll be problems with transla... X-Git-Tag: 1.31.0-rc.0~28615 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=ef665a75c090b554952be5b12d781c8e3a5493fb;p=lhc%2Fweb%2Fwiklou.git r93090 : Make summaries more modular, Siebrand says there'll be problems with translation otherwise. --- diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index b5f4287008..3ef7ddcc21 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' => 'Why 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.', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index b686776aa2..73afce8884 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -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', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 58d8e24827..e0e56fd31f 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -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', diff --git a/resources/mediawiki.page/mediawiki.page.ajaxCategories.js b/resources/mediawiki.page/mediawiki.page.ajaxCategories.js index 86e8947007..2429115dbc 100644 --- a/resources/mediawiki.page/mediawiki.page.ajaxCategories.js +++ b/resources/mediawiki.page/mediawiki.page.ajaxCategories.js @@ -328,7 +328,7 @@ mw.ajaxCategories = function( options ) { // Summary of the action to be taken var summaryHolder = $( '

' ); - summaryHolder.html( mw.msg( 'ajax-category-question', actionSummary ) ); + summaryHolder.html( '' + mw.msg( 'ajax-category-question' ) + '
' + 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( '
' ); } // 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' ); }; /**