Last modified: 2014-04-29 22:30:58 UTC
jqueryMsg can not handle a message with source: '[[Special:GettingStarted/task/$1|Try another article ►]]' and a string parameter (e.g. 'copyedit'). This works fine on the server. It renders to: <a href="/wiki/Special:GettingStarted/task/copyedit" title="Special:GettingStarted/task/copyedit">Try another article ►</a> I suspect that support for replacements in such places needs to be broadened in general. Right now, EXTLINKPARAM is a related special case.
*** Bug 51388 has been marked as a duplicate of this bug. ***
*** Bug 53346 has been marked as a duplicate of this bug. ***
Confirmed. I tested the following code on Google Chrome console mw.loader.using( 'mediawiki.jqueryMsg', function(){ mw.messages.set( { bug47395a: '[[$1|Text]]', bug47395b: '[[link|$1]]' } ); alert( mw.message( 'bug47395a', 'ABC' ).plain() + ': ' + mw.message( 'bug47395a', 'ABC' ).parse() + '\n' + mw.message( 'bug47395b', 'ABC' ).plain() + ': ' + mw.message( 'bug47395b', 'ABC' ).parse() ); } ); and got the following message on Portuguese Wikipedia: [[ABC|Text]]: bug47395a: Parse error at position 0 in input: [[$1|Text]] [[link|ABC]]: <a title="link" href="/wiki/link">ABC</a>
*** Bug 58961 has been marked as a duplicate of this bug. ***
For anyone interested, you can workaround this until this is fixed: mw.loader.using( 'mediawiki.jqueryMsg', function () { mw.messages.set( { foo: '[[$1]]' } ); var msg = mw.message( 'foo', 'bar' ).plain(); // [[bar]] mw.messages.set( { 'some-random-message': msg } ); msg = mw.message( 'some-random-message' ).parse(); // <a title="bar" href="/wiki/bar">bar</a> console.log( msg ); } );