r93196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93195‎ | r93196 | r93197 >
Date:15:50, 26 July 2011
Author:diebuche
Status:ok (Comments)
Tags:
Comment:
r93090 : Make summaries more modular, Siebrand says there'll be problems with translation otherwise.
Modified paths:
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)
  • /trunk/phase3/resources/mediawiki.page/mediawiki.page.ajaxCategories.js (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -3487,7 +3487,6 @@
34883488 'ajax-edit-category-summary',
34893489 'ajax-remove-category-summary',
34903490 'ajax-category-question',
3491 - 'ajax-category-and',
34923491 'ajax-error-title',
34933492 'ajax-remove-category-error',
34943493 'ajax-edit-category-error',
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -4246,13 +4246,10 @@
42474247 'ajax-confirm-title' => 'Title for a dialog box in which the user is asked for an edit summary',
42484248 'ajax-confirm-save' => 'Submit button {{Identical|Save}}',
42494249 'ajax-confirm-save-all' => 'Submit button to save all changes',
4250 -'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.',
4251 -'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.',
4252 -'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.',
4253 -'ajax-category-question' => 'Question the user is asked before submit. $1 is filled with a list of one or more of the following messages;
4254 -{{msg-mw|ajax-add-category-summary}}, {{msg-mw|ajax-remove-category-summary}}, {{msg-mw|ajax-edit-category-summary}}.
4255 -The last of the inserted messages is prefaced by {{msg-mw|ajax-category-and}}. The result would be something like:
4256 -Why do you want to remove Category:A and add Category:C ?',
 4250+'ajax-add-category-summary' => 'See {{msg-mw|ajax-category-question}}. $1 is a category name.',
 4251+'ajax-edit-category-summary' => 'See {{msg-mw|ajax-category-question}}. $1 and $2 are both category names.',
 4252+'ajax-remove-category-summary' => 'See {{msg-mw|ajax-category-question}}. $1 is a category name. ',
 4253+'ajax-category-question' => 'Question the user is asked before submit. It\'s followed by a list of the changes.',
42574254 'ajax-category-and' => 'Used to join multiple list items. Eg. "Edit foo, move bar and add foobar"',
42584255 'ajax-error-title' => '{{Identical|Error}}',
42594256 'ajax-category-already-present' => 'Error message. $1 is the category name',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -4611,11 +4611,10 @@
46124612 'ajax-confirm-save-all' => 'Save all changes',
46134613 'ajax-cancel' => 'Cancel edit',
46144614 'ajax-cancel-all' => 'Cancel all changes',
4615 -'ajax-add-category-summary' => 'add category "$1"',
4616 -'ajax-edit-category-summary' => 'change category "$1" to "$2"',
4617 -'ajax-remove-category-summary' => 'remove category "$1"',
4618 -'ajax-category-question' => '<strong>Why</strong> do you want to $1?',
4619 -'ajax-category-and' => ' and ',
 4615+'ajax-add-category-summary' => 'Add category "$1"',
 4616+'ajax-edit-category-summary' => 'Change category "$1" to "$2"',
 4617+'ajax-remove-category-summary' => 'Remove category "$1"',
 4618+'ajax-category-question' => 'Why do you want to make the following changes:',
46204619 'ajax-error-title' => 'Error',
46214620 'ajax-remove-category-error' => 'It was not possible to remove category "$1".
46224621 This usually occurs when the category has been added to the page in a template.',
Index: trunk/phase3/resources/mediawiki.page/mediawiki.page.ajaxCategories.js
@@ -328,7 +328,7 @@
329329
330330 // Summary of the action to be taken
331331 var summaryHolder = $( '<p/>' );
332 - summaryHolder.html( mw.msg( 'ajax-category-question', actionSummary ) );
 332+ summaryHolder.html( '<strong>' + mw.msg( 'ajax-category-question' ) + '</strong><br>' + actionSummary );
333333 dialog.append( summaryHolder );
334334
335335 // Reason textbox.
@@ -388,13 +388,8 @@
389389 _saveAllButton.hide();
390390 _cancelAllButton.hide();
391391 return;
392 - } else if ( summary.length == 1 ) {
393 - summary = summary.pop();
394392 } else {
395 - var lastSummary = summary.pop();
396 - summary = summary.join( ', ');
397 - summary += mw.msg( 'ajax-category-and' ) + lastSummary;
398 - summary = summary.substring( 0, summary.length - 2 );
 393+ summary = summary.join( '<br>' );
399394 }
400395 // Remove "holes" in array
401396 summaryShort = $.grep( _stash.shortSum, function( n,i ) {
@@ -417,7 +412,7 @@
418413 };
419414 var doneFn = function() { that.resetAll( true ); };
420415
421 - that._confirmEdit( combinedFn, summary, shortSummary, doneFn, '', 'all' );
 416+ that._confirmEdit( combinedFn, summary, summaryShort, doneFn, '', 'all' );
422417 };
423418
424419 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93090* Ignore any <nowiki> or comment sections...diebuche19:03, 25 July 2011

Comments

#Comment by Raymond (talk | contribs)   15:51, 26 July 2011

Thanks. But it was me, not Siebrand :P

#Comment by Aaron Schulz (talk | contribs)   21:06, 9 September 2011

Where are these
tags closed?

#Comment by Aaron Schulz (talk | contribs)   21:07, 9 September 2011

That should read "Where are these br tags closed?"

#Comment by 😂 (talk | contribs)   21:08, 9 September 2011

Well, <br> is self-closing. Since we're moving off XHTML, there's no need for the silly /.

Status & tagging log