r43090 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43089‎ | r43090 | r43091 >
Date:18:46, 2 November 2008
Author:raymond
Status:old (Comments)
Tags:
Comment:
Fix for r43077:
* Use wfMsg to show error message in user preference language. wfMsgForContent does not make sense
* Rename new message name to MediaWiki code standards. Use dash and not underscore
Modified paths:
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesHe.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -2761,7 +2761,7 @@
27622762 ),
27632763 'CoreParserFunctions' => array(
27642764 'unknown_extension_tag',
2765 - 'duplicate_defaultsort',
 2765+ 'duplicate-defaultsort',
27662766 ),
27672767 'version' => array(
27682768 'version',
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -338,7 +338,7 @@
339339 return '';
340340 else
341341 return( '<span class="error">' .
342 - wfMsgForContent( 'duplicate_defaultsort',
 342+ wfMsg( 'duplicate-defaultsort',
343343 htmlspecialchars( $old ),
344344 htmlspecialchars( $text ) ) .
345345 '</span>' );
@@ -376,7 +376,7 @@
377377 $stripList = $parser->getStripList();
378378 if ( !in_array( $tagName, $stripList ) ) {
379379 return '<span class="error">' .
380 - wfMsgForContent( 'unknown_extension_tag', $tagName ) .
 380+ wfMsg( 'unknown_extension_tag', $tagName ) .
381381 '</span>';
382382 }
383383
Index: trunk/phase3/languages/messages/MessagesHe.php
@@ -3075,7 +3075,7 @@
30763076
30773077 # Core parser functions
30783078 'unknown_extension_tag' => 'תגית בלתי ידועה: "$1"',
3079 -'duplicate_defaultsort' => 'אזהרה: המיון הרגיל "$2" דורס את המיון הרגיל המוקדם ממנו "$1".',
 3079+'duplicate-defaultsort' => 'אזהרה: המיון הרגיל "$2" דורס את המיון הרגיל המוקדם ממנו "$1".',
30803080
30813081 # Special:Version
30823082 'version' => 'גרסת התוכנה', # Not used as normal message but as header for the special page itself
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -3661,7 +3661,7 @@
36623662
36633663 # Core parser functions
36643664 'unknown_extension_tag' => 'Unknown extension tag "$1"',
3665 -'duplicate_defaultsort' => 'Warning: Default sort key "$2" overrides earlier default sort key "$1".',
 3665+'duplicate-defaultsort' => 'Warning: Default sort key "$2" overrides earlier default sort key "$1".',
36663666
36673667 # Special:Version
36683668 'version' => 'Version', # Not used as normal message but as header for the special page itself

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r43077Emit a warning message if a single page has multiple conflicting {{DEFAULTSOR...vyznev14:21, 2 November 2008

Comments

#Comment by Ilmari Karonen (talk | contribs)   05:13, 3 November 2008

I'm fairly sure that's not right. Those messages are being emitted as part of the page content, and will presumably end up in the parser cache if someone saves a page with such an error in it.

#Comment by Ilmari Karonen (talk | contribs)   06:51, 3 November 2008

Ah, never mind, the language code is included in the page rendering hash.

Status & tagging log