r77469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77468‎ | r77469 | r77470 >
Date:11:03, 30 November 2010
Author:catrope
Status:deferred
Tags:
Comment:
Fix r77466 for nonexistent messages
Modified paths:
  • /trunk/extensions/UploadWizard/resources/combined.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/combined.min.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/language/mw.Language.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/language/mw.Language.js
@@ -52,10 +52,10 @@
5353 mw.getMsg = function( messageKey , args ) {
5454
5555 // Check for missing message key
56 - if ( ! messageCache[ messageKey ] && 'msg' in mediaWiki ) {
 56+ if ( ! messageCache[ messageKey ] ) {
5757 // Try the ResourceLoader's message store
5858 // FIXME: The two message stores should be unified in the future
59 - var rlMsg = mediaWiki.msg( messageKey );
 59+ var rlMsg = 'msg' in mediaWiki ? mediaWiki.msg( messageKey ) : ( '<' + messageKey + '>' );
6060 if ( rlMsg == ( '<' + messageKey + '>' ) ) {
6161 return '[' + messageKey + ']';
6262 }
Index: trunk/extensions/UploadWizard/resources/combined.js
@@ -7478,10 +7478,10 @@
74797479 mw.getMsg = function( messageKey , args ) {
74807480
74817481 // Check for missing message key
7482 - if ( ! messageCache[ messageKey ] && 'msg' in mediaWiki ) {
 7482+ if ( ! messageCache[ messageKey ] ) {
74837483 // Try the ResourceLoader's message store
74847484 // FIXME: The two message stores should be unified in the future
7485 - var rlMsg = mediaWiki.msg( messageKey );
 7485+ var rlMsg = 'msg' in mediaWiki ? mediaWiki.msg( messageKey ) : ( '<' + messageKey + '>' );
74867486 if ( rlMsg == ( '<' + messageKey + '>' ) ) {
74877487 return '[' + messageKey + ']';
74887488 }
Index: trunk/extensions/UploadWizard/resources/combined.min.js
@@ -7478,10 +7478,10 @@
74797479 mw.getMsg=function(messageKey,args){
74807480
74817481
7482 -if(!messageCache[messageKey]&&'msg'in mediaWiki){
 7482+if(!messageCache[messageKey]){
74837483
74847484
7485 -var rlMsg=mediaWiki.msg(messageKey);
 7485+var rlMsg='msg'in mediaWiki?mediaWiki.msg(messageKey):('<'+messageKey+'>');
74867486 if(rlMsg==('<'+messageKey+'>')){
74877487 return'['+messageKey+']';
74887488 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77466UploadWizard: Account for the fact that mediaWiki.msg might not exist (in pre...catrope10:29, 30 November 2010

Status & tagging log