r106318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106317‎ | r106318 | r106319 >
Date:13:33, 15 December 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
* (bug 33159) Enable localizing the content of the 'What is this?' link on the WikiLove interface
Modified paths:
  • /trunk/extensions/WikiLove/WikiLove.i18n.php (modified) (history)
  • /trunk/extensions/WikiLove/WikiLove.php (modified) (history)
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -44,7 +44,7 @@
4545 $button.append( '<div class="mw-wikilove-r-cap"></div>');
4646 $typeList.append( $( '<li tabindex="0"></li>' ).append( $button ) );
4747 }
48 -
 48+
4949 var commonsLink = $( '<a>' )
5050 .attr( 'href', mw.msg( 'wikilove-commons-url' ) )
5151 .attr( 'target', '_blank' )
@@ -74,7 +74,7 @@
7575 <li><html:msg key="wikilove-get-started-list-2"/></li>\
7676 <li><html:msg key="wikilove-get-started-list-3"/></li>\
7777 </ol>\
78 - <p><a target="_blank" href="http://www.mediawiki.org/wiki/WikiLove">\
 78+ <p><a target="_blank" href="' + mw.msg( 'wikilove-what-is-this-link' ) + '">\
7979 <html:msg key="wikilove-what-is-this"/>\
8080 </a></p>\
8181 <p id="mw-wikilove-anon-warning"><strong><html:msg key="wikilove-anon-warning"/></strong></p>\
Index: trunk/extensions/WikiLove/WikiLove.i18n.php
@@ -173,6 +173,7 @@
174174 'wikilove-err-send-api' => 'Something went wrong when sending the message. Please try again.',
175175 'wikilove-summary' => '/* $1 */ new WikiLove message',
176176 'wikilove-what-is-this' => "What is this?",
 177+ 'wikilove-what-is-this-link' => "https://www.mediawiki.org/wiki/WikiLove",
177178 'wikilove-anon-warning' => 'Note: This user is not registered, he or she may not notice this message.',
178179 'wikilove-commons-text' => 'You can find images by browsing $1.',
179180 'wikilove-commons-link' => 'Wikimedia Commons',
@@ -235,6 +236,7 @@
236237 'wikilove-err-msg' => 'A warning shown when the message is empty.',
237238 'wikilove-what-is-this' => '[[File:Wiki Love 002.png|thumb]]
238239 {{Identical|What is this}}',
 240+ 'wikilove-what-is-this-link' => '{{optional}}',
239241 'wikilove-commons-text' => '[[File:Wiki Love 004.png|thumb]]
240242 $1 gets replaced by a link with {{msg-mw|wikilove-commons-link}} ("Wikimedia Commons") as caption and {{msg-mw|wikilove-commons-url}} as URL.',
241243 'wikilove-commons-link' => '{{optional}}',
Index: trunk/extensions/WikiLove/WikiLove.php
@@ -259,6 +259,7 @@
260260 'wikilove-err-gallery',
261261 'wikilove-err-gallery-again',
262262 'wikilove-what-is-this',
 263+ 'wikilove-what-is-this-link',
263264 'wikilove-anon-warning',
264265 'wikilove-commons-text',
265266 'wikilove-commons-link',

Follow-up revisions

RevisionCommit summaryAuthorDate
r106344Escape the URL on outputreedy17:33, 15 December 2011
r106357r106318: new message key is optionalraymond19:00, 15 December 2011

Comments

#Comment by Catrope (talk | contribs)   16:47, 15 December 2011
-	<p><a target="_blank" href="[http://www.mediawiki.org/wiki/WikiLove http://www.mediawiki.org/wiki/WikiLove]">\
+	<p><a target="_blank" href="' + mw.msg( 'wikilove-what-is-this-link' ) + '">\

Should be escaped.

Status & tagging log