r107051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107050‎ | r107051 | r107052 >
Date:10:01, 22 December 2011
Author:santhosh
Status:ok (Comments)
Tags:
Comment:
Add a help link to WebFonts, pointing to mediawiki.org.
i18n card #303
Modified paths:
  • /trunk/extensions/WebFonts/WebFonts.i18n.php (modified) (history)
  • /trunk/extensions/WebFonts/resources/ext.webfonts.css (modified) (history)
  • /trunk/extensions/WebFonts/resources/ext.webfonts.js (modified) (history)
  • /trunk/extensions/WebFonts/resources/images/help.png (added) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/resources/ext.webfonts.js
@@ -301,7 +301,7 @@
302302
303303 }
304304
305 - $link = $label = $item = undefined;
 305+ $resetLink = $resetLabel = $resetItem = undefined;
306306
307307 if ( !haveSchemes && !$( '.webfonts-lang-attr' ).length ) {
308308 // No schemes available, and no tags with lang attr
@@ -309,24 +309,33 @@
310310 return null;
311311 }
312312
313 - $link = $( '<input type="radio" name="font" />' )
 313+ $resetLink = $( '<input type="radio" name="font" />' )
314314 .attr( 'value', 'webfont-none' )
315315 .attr( 'id', 'webfont-none' )
316316 .click( function() {
317317 mw.webfonts.set( 'none' );
318318 });
319319
320 - $label = $( '<label>' )
 320+ $resetLabel = $( '<label>' )
321321 .attr( 'for', 'webfont-none' )
322 - .append( $link )
 322+ .append( $resetLink )
323323 .append( mw.message( 'webfonts-reset' ).escaped() );
324324
325 - $item = $( '<li>' )
 325+ $resetItem = $( '<li>' )
326326 .val( 'none' )
327 - .append( $label );
 327+ .append( $resetLabel );
328328
329 - $fontsMenu.append( $item );
 329+ $fontsMenu.append( $resetItem );
330330
 331+
 332+
 333+ var $helpLink = $( '<a id="webfont-help-link" >' )
 334+ .text( mw.msg( 'webfonts-help' ) )
 335+ .prop( 'href', '//mediawiki.org/wiki/Special:MyLanguage/Help:Web_fonts' )
 336+ .prop( 'target', '_blank');
 337+ var $helpItem = $( '<li>' ).addClass( 'webfont-help-item' ).append( $helpLink );
 338+ $fontsMenu.append( $helpItem );
 339+
331340 return $( '<div>' )
332341 .attr( 'id', 'webfonts-fonts' )
333342 .addClass( 'menu' )
Index: trunk/extensions/WebFonts/resources/images/help.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/WebFonts/resources/images/help.png
___________________________________________________________________
Added: svn:mime-type
334343 + image/png
Index: trunk/extensions/WebFonts/resources/ext.webfonts.css
@@ -119,3 +119,9 @@
120120 cursor: pointer;
121121 }
122122
 123+a#webfont-help-link {
 124+ /* @embed */
 125+ background: url(images/help.png) no-repeat scroll left center transparent;
 126+ padding-left: 20px;
 127+ font-size: 1.0em;
 128+}
Index: trunk/extensions/WebFonts/WebFonts.i18n.php
@@ -18,6 +18,7 @@
1919 'webfonts-reset' => 'Reset',
2020 'webfonts-enable-preference' => 'Enable font embedding (WebFonts)',
2121 'webfonts-menu-tooltip' => 'Select a font for the page',
 22+ 'webfonts-help' => 'Help',
2223 );
2324
2425 /** Message documentation (Message documentation)
@@ -29,6 +30,7 @@
3031 'webfonts-load' => 'The text shown in the webfont link',
3132 'webfonts-reset' => '{{Identical|Reset}}',
3233 'webfonts-menu-tooltip' => 'Tooltip text displayed in the webfont link',
 34+ 'webfonts-help' => 'Text for the help link',
3335 );
3436
3537 /** Arabic (العربية)
@@ -366,6 +368,7 @@
367369 'webfonts-reset' => 'പഴയപടിയാക്കുക',
368370 'webfonts-enable-preference' => 'ഫോണ്ട് എംബെഡ് ചെയ്യുക.(വെബ്ഫോണ്ട്സ്)',
369371 'webfonts-menu-tooltip' => 'താളിനുവേണ്ടി ഒരു ഫോണ്ട് തിരഞ്ഞെടുക്കുക',
 372+ 'webfonts-help' => 'സഹായം',
370373 );
371374
372375 /** Marathi (मराठी)
@@ -539,6 +542,7 @@
540543 'webfonts-load' => 'எழுத்துரு மாற்ற',
541544 'webfonts-reset' => 'இயல்பு எழுத்துரு',
542545 'webfonts-enable-preference' => 'எழுத்துரு புதைத்தல் (இணைய எழுத்துருக்களை) பயன்படுத்துக',
 546+ 'webfonts-help' => 'உதவி',
543547 );
544548
545549 /** Tagalog (Tagalog)

Follow-up revisions

RevisionCommit summaryAuthorDate
r107056Get the help link from messages based on content language.santhosh11:15, 22 December 2011
r107378I18ndeploy...nikerabbit13:32, 27 December 2011

Comments

#Comment by Siebrand (talk | contribs)   10:35, 22 December 2011

Can we make the help URL configurable in a messag? Then at least locall communities will be able to override the centralised help page. If we don't do this, I expect a change request for it almost immediately after deployment ...

#Comment by Santhosh.thottingal (talk | contribs)   11:17, 22 December 2011

Help link made configurable in r107056

Status & tagging log