r107378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107377‎ | r107378 | r107379 >
Date:13:32, 27 December 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/Narayam/resources/ext.narayam.core.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Narayam/resources/images/help.png (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.hooks.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.fontlist.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WebFonts/resources/images/help.png (added) (history)
  • /branches/wmf/1.18wmf1/extensions/WikimediaIncubator/InfoPage.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/languages/messages/MessagesCs.php (modified) (history)
  • /branches/wmf/1.18wmf1/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/Narayam/resources/images/help.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: branches/wmf/1.18wmf1/extensions/Narayam/resources/ext.narayam.core.css
@@ -105,7 +105,8 @@
106106 div#narayam-menu-items li.narayam-help-link a {
107107 /* @embed */
108108 background: url('images/help.png') no-repeat scroll left center transparent;
109 - padding-left: 15px;
 109+ padding-left: 20px;
 110+ line-height: 1.5em;
110111 }
111112
112113 li#pt-narayam.narayam-active {
Index: branches/wmf/1.18wmf1/extensions/WikimediaIncubator/InfoPage.i18n.php
@@ -38,7 +38,7 @@
3939 'wminc-infopage-option-startwiki' => 'If you want to start this wiki,
4040 you can [{{fullurl:{{FULLPAGENAME}}|action=edit}} create the page] and follow [[{{MediaWiki:Wminc-manual-url}}|our manual]].',
4141 'wminc-infopage-option-startsister' => 'If you want to start this wiki, you can go to <b>[$2 $1]</b>.',
42 - 'wminc-infopage-option-languages-existing' => 'You can search for [http://www.$1.org existing language editions of $1].',
 42+ 'wminc-infopage-option-languages-existing' => 'You can search for [//www.$1.org existing language editions of $1].',
4343 'wminc-infopage-option-sisterprojects-existing' => 'You can search for existing projects in this language:',
4444 'wminc-infopage-option-sisterprojects-other' => 'You can search for other projects in this language:',
4545 'wminc-infopage-option-multilingual' => 'You can go to a multilingual wiki:',
Index: branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.hooks.php
@@ -41,8 +41,16 @@
4242
4343 return true;
4444 }
45 -
 45+
4646 /**
 47+ * Hook: ResourceLoaderGetConfigVars
 48+ */
 49+ public static function addConfig( &$vars ) {
 50+ $vars['wgWebFontsHelpPage'] = wfMsgForContent( 'webfonts-help-page' );
 51+ return true;
 52+ }
 53+
 54+ /**
4755 * UserGetDefaultOptions hook handler.
4856 * @param $defaultOptions array
4957 * @return bool
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.js
@@ -1,4 +1,4 @@
2 -( function( $ ) {
 2+( function( $, mw, undefined ) {
33
44 function fontID( font ) {
55 if ( typeof font !== 'string' ) {
@@ -19,28 +19,30 @@
2020 return;
2121 }
2222
23 - if ( !( font in mw.webfonts.config.fonts ) ) {
 23+ if ( mw.webfonts.config.fonts[font] === undefined ) {
2424 mw.log( 'Requested unknown font', font );
2525 return;
2626 }
27 - var config = mw.webfonts.config.fonts[font];
 27+ var config = mw.webfonts.config.fonts[font],
 28+ $body = $( 'body' );
2829
2930 // Load the style sheet for the font
3031 mw.webfonts.addFont( font );
31 -
 32+
3233 // Save the current font and its size. Used for reset.
3334 if ( !mw.webfonts.oldconfig ) {
34 - var $body = $( 'body' );
 35+
3536 mw.webfonts.oldconfig = {
3637 fontFamily: $body.css( 'font-family' ),
3738 fontSize: $body.css( 'font-size' )
3839 };
3940 }
4041
41 - // Set the font, fallback fonts.Need to change the fonts of Input Select and Textarea explicitly.
 42+ // Set the font, fallback fonts.
 43+ // Need to change the fonts of Input Select and Textarea explicitly.
4244 $( 'body, input, select, textarea' ).css( 'font-family', '"' + font + '", Helvetica, Arial, sans-serif' );
4345
44 - if ( 'normalization' in config ) {
 46+ if ( config.normalization !== undefined ) {
4547 $( document ).ready( function() {
4648 mw.webfonts.normalize( config.normalization );
4749 } );
@@ -79,7 +81,7 @@
8082 var searchPattern = new RegExp( search, 'g' );
8183 return $( '*' ).each( function() {
8284 var node = this.firstChild,
83 - val, newVal;
 85+ val, newVal;
8486 if ( node ) {
8587 do {
8688 if ( node.nodeType === 3 ) {
@@ -101,50 +103,49 @@
102104 * @param fontFamily The font-family name
103105 */
104106 loadCSS: function( fontFamily ) {
105 - var fontconfig = mw.webfonts.config.fonts[fontFamily];
106 - var base = mw.config.get( 'wgExtensionAssetsPath' ) + '/WebFonts/fonts/';
107 - var fontFormats = [];
108 - var version = "0.0";
109 - if ( 'version' in fontconfig ) {
110 - version = fontconfig.version;
111 - }
112 - var versionSuffix = "?version=" + version + '&20111213';
113 - var styleString =
114 - "<style type='text/css'>\n@font-face {\n"
115 - + "\tfont-family: '"+fontFamily+"';\n";
 107+ var fontconfig = mw.webfonts.config.fonts[fontFamily],
 108+ base = mw.config.get( 'wgExtensionAssetsPath' ) + '/WebFonts/fonts/',
 109+ fontFormats = [],
 110+ version = fontconfig.version || "0.0",
 111+ versionSuffix = "?version=" + version + '&20111213',
 112+ styleString = "<style type='text/css'>"
 113+ + "@font-face { font-family: '"+fontFamily+"';\n",
 114+ ua = navigator.userAgent;
116115
117 - if ( 'eot' in fontconfig ) {
118 - styleString += "\tsrc: url('" + base+ fontconfig.eot + versionSuffix+ "');\n";
 116+ if ( fontconfig.eot !== undefined ) {
 117+ styleString += "\tsrc: url('" + base + fontconfig.eot + versionSuffix + "');\n";
119118 }
120119
121120 styleString += "\tsrc: ";
 121+
122122 // If the font is present locally, use it.
123 - var ua = navigator.userAgent;
124 - if( ua.match( /Android 2\.3/ ) == null ) {
125 - // Android 2.3.x does not respect local() syntax.
 123+ if( ua.match( /Android 2\.3/ ) === null ) {
 124+ // Android 2.3.x does not respect local() syntax.
126125 // http://code.google.com/p/android/issues/detail?id=10609
127 - styleString += "local('"+fontFamily+"'),";
 126+ styleString += "local('" + fontFamily + "'),";
128127 }
129 -
130 - if ( 'woff' in fontconfig ) {
 128+
 129+ if ( fontconfig.woff !== undefined ) {
131130 fontFormats.push( "\t\turl('" + base + fontconfig.woff + versionSuffix + "') format('woff')" );
132131 }
133132
134 - if ( 'svg' in fontconfig ) {
 133+ if ( fontconfig.svg !== undefined ) {
135134 fontFormats.push( "\t\turl('" + base + fontconfig.svg + versionSuffix + "#" + fontFamily + "') format('svg')" );
136135 }
137136
138 - if ( 'ttf' in fontconfig ) {
 137+ if ( fontconfig.ttf !== undefined ) {
139138 fontFormats.push( "\t\turl('" + base + fontconfig.ttf + versionSuffix + "') format('truetype')" );
140139 }
141 -
 140+
142141 styleString += fontFormats.join() + ";\n";
143 - styleString += "\tfont-weight: normal;\n}\n</style>\n";
 142+ styleString += "\tfont-weight: normal;}";
144143
145 - //inject the css to the head of the page.
 144+ styleString += "\n</style>\n";
 145+ // inject the css to the head of the page.
 146+ // mw.util.addCSS wont work with fontface, and crashes IE.
146147 $( styleString ).appendTo( 'head' );
147148 },
148 -
 149+
149150 /**
150151 * Add a font to the page.
151152 * This method ensures that css are not duplicated and
@@ -155,13 +156,13 @@
156157 // Avoid duplicate loading
157158 if ( $.inArray( fontFamilyName, mw.webfonts.fonts ) === -1 ) {
158159 // Check whether the requested font is available.
159 - if ( fontFamilyName in mw.webfonts.config.fonts ) {
 160+ if ( mw.webfonts.config.fonts[fontFamilyName] !== undefined ) {
160161 mw.webfonts.loadCSS( fontFamilyName );
161162 mw.webfonts.fonts.push( fontFamilyName );
162163 }
163164 }
164165 },
165 -
 166+
166167 /**
167168 * Setup the font selection menu.
168169 * It also apply the font from cookie, if any.
@@ -178,52 +179,53 @@
179180 return;
180181 }
181182 }
182 -
183 - var config = [];
184 - var languages = mw.webfonts.config.languages;
185 - var requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )];
186183
187 - for ( var i = 0; i < requested.length; i++ ) {
188 - if ( requested[i] in languages ) {
189 - var fonts = languages[requested[i]];
190 - for ( var j = 0; j < fonts.length; j++ ) {
191 - if ( $.inArray( fonts[j], config ) === -1 ) {
192 - config.push( fonts[j] );
 184+ var fonts = [],
 185+ languages = mw.webfonts.config.languages,
 186+ requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )],
 187+ i, j;
 188+
 189+ for ( i = 0; i < requested.length; i++ ) {
 190+ if ( languages[requested[i]] !== undefined ) {
 191+ fonts = languages[requested[i]];
 192+ for ( j = 0; j < fonts.length; j++ ) {
 193+ if ( $.inArray( fonts[j], fonts ) === -1 ) {
 194+ fonts.push( fonts[j] );
193195 }
194196 }
195197 }
196198 }
197199
198200 // Build font dropdown
199 - mw.webfonts.buildMenu( config );
 201+ mw.webfonts.buildMenu( fonts );
200202 // See if there is a font in cookie if not first font is default font.
201 - var cookieFont = $.cookie( 'webfonts-font' );
202 - var selectedFont = null;
 203+ var cookieFont = $.cookie( 'webfonts-font' ),
 204+ selectedFont = null;
203205 // check whether this font is for the current userlang/contentlang
204 - if ( $.inArray( cookieFont, config ) !== -1 || cookieFont === 'none' ) {
 206+ if ( $.inArray( cookieFont, fonts ) !== -1 || cookieFont === 'none' ) {
205207 selectedFont = cookieFont;
206208 }
207 - else{
208 - // We cannot use cookie font since it is not one of the fonts suitable
 209+ else {
 210+ // We cannot use cookie font since it is not one of the fonts suitable
209211 // for current language.
210 - selectedFont = config[0];
 212+ selectedFont = fonts[0];
211213 }
212214 if ( selectedFont ) {
213215 mw.webfonts.set( selectedFont );
214216 // Mark it as checked
215217 $( '#'+fontID( selectedFont ) ).prop( 'checked', true );
216218 }
217 -
 219+
218220 mw.webfonts.loadFontsForFontFamilyStyle();
219221 mw.webfonts.loadFontsForLangAttr();
220222
221223 if ( $( '.webfonts-lang-attr' ).length && !$( '#webfonts-fontsmenu' ).length ) {
222 - // We need to show the reset option even if there is no font to show
 224+ // We need to show the reset option even if there is no font to show
223225 // for the language, if there is lang attr based font embedding.
224 - mw.webfonts.buildMenu( config );
 226+ mw.webfonts.buildMenu( fonts );
225227 }
226228 },
227 -
 229+
228230 /**
229231 * Scan the page for tags with lang attr and load the default font
230232 * for that language if available.
@@ -232,32 +234,31 @@
233235 var languages = mw.webfonts.config.languages;
234236 var requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )];
235237 var fontFamily = false;
236 - // If there are tags with lang attribute,
237 - $( 'body' ).find( '*[lang]' ).each( function( index ) {
 238+ // If there are tags with lang attribute,
 239+ $( 'body' ).find( '*[lang]' ).each( function( i, el) {
238240 // If the lang attribute value is same as one of
239241 // contentLang,useLang, variant, no need to do this.
240 - if( $.inArray( this.lang , requested ) === -1 ) {
 242+ if( $.inArray( el.lang , requested ) === -1 ) {
241243 // check the availability of font, add a font-family style if it does not have any
242 - if( languages[this.lang] && ( !this.style.fontFamily || this.style.fontFamily === 'none' ) ) {
243 - fontFamily = languages[this.lang][0];
 244+ if( languages[el.lang] && ( !el.style.fontFamily || el.style.fontFamily === 'none' ) ) {
 245+ fontFamily = languages[el.lang][0];
244246 mw.webfonts.addFont( fontFamily );
245 - $(this).css( 'font-family', fontFamily ).addClass( 'webfonts-lang-attr' );
 247+ $(el).css( 'font-family', fontFamily ).addClass( 'webfonts-lang-attr' );
246248 }
247249 }
248250 });
249251 },
250 -
 252+
251253 /**
252254 * Scan the page for tags with font-family style declarations
253255 * If that font is available, embed it.
254256 */
255257 loadFontsForFontFamilyStyle: function() {
256 - var languages = mw.webfonts.config.languages;
257258 // If there are tags with font-family style definition, get a list of fonts to be loaded
258 - $( 'body' ).find( '*[style]' ).each( function( index ) {
259 - if( this.style.fontFamily ) {
260 - var fontFamilyItems = this.style.fontFamily.split( ',' );
261 - $.each( fontFamilyItems, function( index, fontFamily ) {
 259+ $( 'body' ).find( '*[style]' ).each( function( i, el ) {
 260+ if( el.style.fontFamily ) {
 261+ var fontFamilyItems = el.style.fontFamily.split( ',' );
 262+ $.each( fontFamilyItems, function( i, fontFamily ) {
262263 // Remove the ' characters if any.
263264 fontFamily = fontFamily.replace( /'/g, '' );
264265 mw.webfonts.addFont( fontFamily );
@@ -266,79 +267,90 @@
267268 });
268269
269270 },
270 -
 271+
271272 /**
272273 * Prepare the div containing menu items.
273 - * @param config The webfont configuration.
 274+ * @param fonts {Array} List of fonts to be provided as a menu option.
274275 */
275 - buildMenuItems: function ( config ){
276 - var haveSchemes = false;
277 - // Build font dropdown
278 - var $fontsMenu = $( '<ul>' ).attr( 'id', 'webfonts-fontsmenu' );
279 - $fontsMenu.delegate( 'input:radio', 'click', function( ) {
280 - mw.webfonts.set( $(this).val() );
281 - } );
282 - for ( var scheme in config ) {
283 - if ( !Object.prototype.hasOwnProperty.call( config, scheme ) ) {
284 - continue;
285 - }
 276+ buildMenuItems: function ( fonts ){
 277+ var haveSchemes = false,
 278+ $fontsMenu = $( '<ul>' )
 279+ .attr( 'id', 'webfonts-fontsmenu' )
 280+ .delegate( 'input:radio', 'click', function() {
 281+ mw.webfonts.set( $(this).val() );
 282+ } ),
 283+ len = fonts.length,
 284+ i, font, $link, $label, $item;
286285
287 - var $fontLink = $( '<input type="radio" name="font" />' )
288 - .attr( 'id', fontID( config[scheme] ) )
289 - .val( config[scheme] );
 286+ for ( i = 0; i < len; i++ ) {
 287+ font = fonts[i];
290288
291 - var $fontLabel = $( '<label>' )
292 - .attr( 'for',fontID(config[scheme] ) )
293 - .append( $fontLink )
294 - .append( config[scheme] );
 289+ $link = $( '<input type="radio" name="font" />' )
 290+ .attr( 'id', fontID( font ) )
 291+ .val( font );
295292
296 - var $fontMenuItem = $( '<li>' )
297 - .val( config[scheme] )
298 - .append( $fontLabel );
 293+ $label = $( '<label>' )
 294+ .attr( 'for',fontID( font ) )
 295+ .append( $link )
 296+ .append( font );
299297
 298+ $item = $( '<li>' )
 299+ .val( font )
 300+ .append( $label );
 301+
300302 haveSchemes = true;
301303
302 - $fontsMenu.append( $fontMenuItem );
 304+ $fontsMenu.append( $item );
303305
304306 }
305307
306 - if ( !haveSchemes && !$( '.webfonts-lang-attr' ).length ) {
 308+ $resetLink = $resetLabel = $resetItem = undefined;
 309+
 310+ if ( !haveSchemes && !$( '.webfonts-lang-attr' ).length ) {
307311 // No schemes available, and no tags with lang attr
308312 // with fonts loaded. Don't show the menu.
309313 return null;
310314 }
311315
312 - var $resetLink = $( '<input type="radio" name="font" />' )
 316+ $resetLink = $( '<input type="radio" name="font" />' )
313317 .attr( 'value', 'webfont-none' )
314318 .attr( 'id', 'webfont-none' )
315 - .click( function( e ) {
 319+ .click( function() {
316320 mw.webfonts.set( 'none' );
317321 });
318322
319 - var $resetLabel = $( '<label>' )
 323+ $resetLabel = $( '<label>' )
320324 .attr( 'for', 'webfont-none' )
321325 .append( $resetLink )
322326 .append( mw.message( 'webfonts-reset' ).escaped() );
323327
324 - var $resetLinkItem = $( '<li>' )
 328+ $resetItem = $( '<li>' )
325329 .val( 'none' )
326330 .append( $resetLabel );
327331
328 - $fontsMenu.append( $resetLinkItem );
 332+ $fontsMenu.append( $resetItem );
329333
330 - var $menuDiv = $( '<div>' )
 334+
 335+ var helpPage = mw.config.get( 'wgWebFontsHelpPage' );
 336+ var $helpLink = $( '<a id="webfont-help-link" >' )
 337+ .text( mw.msg( 'webfonts-help' ) )
 338+ .prop( 'href', helpPage )
 339+ .prop( 'target', '_blank');
 340+ var $helpItem = $( '<li>' ).addClass( 'webfont-help-item' ).append( $helpLink );
 341+ $fontsMenu.append( $helpItem );
 342+
 343+ return $( '<div>' )
331344 .attr( 'id', 'webfonts-fonts' )
332345 .addClass( 'menu' )
333 - .append( $fontsMenu )
334 - .append();
335 - return $menuDiv;
 346+ .append( $fontsMenu );
336347 },
 348+
337349 /**
338350 * Prepare the menu for the webfonts.
339 - * @param config The webfont configuration.
 351+ * @param fonts {Array} List of fonts to be provided as a menu option.
340352 */
341 - buildMenu: function(config) {
342 - var $menuItemsDiv = mw.webfonts.buildMenuItems( config );
 353+ buildMenu: function( fonts ) {
 354+ var $menuItemsDiv = mw.webfonts.buildMenuItems( fonts );
343355 if( $menuItemsDiv === null ) {
344356 return;
345357 }
@@ -363,7 +375,7 @@
364376 $( 'body' ).prepend( $menu );
365377 $li.click( function( event ) {
366378 var menuSide, menuOffset, distanceToEdge;
367 -
 379+
368380 if ( rtlEnv ) {
369381 distanceToEdge = $li.outerWidth() + $li.offset().left;
370382 if ( $menuItemsDiv.outerWidth() > distanceToEdge ) {
@@ -394,22 +406,25 @@
395407 event.stopPropagation();
396408 }
397409 } );
 410+
398411 $( 'html' ).click( function() {
399412 $menu.removeClass( 'open' );
400413 } );
 414+
401415 $menu.click( function( event ) {
402416 event.stopPropagation();
403417 } );
 418+
404419 // Workaround for IE bug - ActiveX components like input fields coming on top of everything.
405420 // @todo Is there a better solution other than hiding it on hover?
406 - if ( $.browser.msie ) {
 421+ if ( $.browser.msie ) {
407422 $( '#webfonts-menu' ).hover( function() {
408423 $( '#searchform' ).css({ visibility: 'hidden' } );
409 - }, function( ) {
 424+ }, function() {
410425 $( '#searchform' ).css( { visibility: 'visible' } );
411426 } );
412427 }
413428 }
414429 };
415430
416 -} ) ( jQuery );
 431+})( jQuery, mediaWiki );
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.fontlist.js
@@ -41,7 +41,7 @@
4242 woff: "Deva/SamyakDevanagari.woff",
4343 version: "1.0"
4444 },
45 -
 45+
4646 "Madan": {
4747 eot: "Deva/madan.eot",
4848 ttf: "Deva/madan.ttf",
@@ -89,7 +89,7 @@
9090 eot: "Khmr/KhmerOS.eot",
9191 ttf: "Khmr/KhmerOS.ttf",
9292 woff: "Khmr/KhmerOS.woff",
93 - svg: "Khmr/KhmerOS.svg",
 93+ svg: "Khmr/KhmerOS.svg",
9494 version: "1.10"
9595 },
9696
@@ -97,7 +97,7 @@
9898 eot: "Khmr/KhmerOSbattambang.eot",
9999 ttf: "Khmr/KhmerOSbattambang.ttf",
100100 woff: "Khmr/KhmerOSbattambang.woff",
101 - svg: "Khmr/KhmerOSbattambang.svg",
 101+ svg: "Khmr/KhmerOSbattambang.svg",
102102 version: "1.10"
103103 },
104104
@@ -105,7 +105,7 @@
106106 eot: "Khmr/KhmerOSbokor.eot",
107107 ttf: "Khmr/KhmerOSbokor.ttf",
108108 woff: "Khmr/KhmerOSbokor.woff",
109 - svg: "Khmr/KhmerOSbokor.svg",
 109+ svg: "Khmr/KhmerOSbokor.svg",
110110 version: "1.10"
111111 },
112112
@@ -113,7 +113,7 @@
114114 eot: "Khmr/KhmerOSfreehand.eot",
115115 ttf: "Khmr/KhmerOSfreehand.ttf",
116116 woff: "Khmr/KhmerOSfreehand.woff",
117 - svg: "Khmr/KhmerOSfreehand.svg",
 117+ svg: "Khmr/KhmerOSfreehand.svg",
118118 version: "1.10"
119119 },
120120
@@ -121,7 +121,7 @@
122122 eot: "Khmr/KhmerOSfasthand.eot",
123123 ttf: "Khmr/KhmerOSfasthand.ttf",
124124 woff: "Khmr/KhmerOSfasthand.woff",
125 - svg: "Khmr/KhmerOSfasthand.svg",
 125+ svg: "Khmr/KhmerOSfasthand.svg",
126126 version: "1.10"
127127 },
128128
@@ -129,7 +129,7 @@
130130 eot: "Khmr/KhmerOSmuol.eot",
131131 ttf: "Khmr/KhmerOSmuol.ttf",
132132 woff: "Khmr/KhmerOSmuol.woff",
133 - svg: "Khmr/KhmerOSmuol.svg",
 133+ svg: "Khmr/KhmerOSmuol.svg",
134134 version: "1.10"
135135 },
136136
@@ -137,7 +137,7 @@
138138 eot: "Khmr/KhmerOSmuollight.eot",
139139 ttf: "Khmr/KhmerOSmuollight.ttf",
140140 woff: "Khmr/KhmerOSmuollight.woff",
141 - svg: "Khmr/KhmerOSmuollight.svg",
 141+ svg: "Khmr/KhmerOSmuollight.svg",
142142 version: "1.10"
143143 },
144144
@@ -145,7 +145,7 @@
146146 eot: "Khmr/KhmerOSmuolpali.eot",
147147 ttf: "Khmr/KhmerOSmuolpali.ttf",
148148 woff: "Khmr/KhmerOSmuolpali.woff",
149 - svg: "Khmr/KhmerOSmuolpali.svg",
 149+ svg: "Khmr/KhmerOSmuolpali.svg",
150150 version: "1.10"
151151 },
152152
@@ -153,7 +153,7 @@
154154 eot: "Khmr/KhmerOSsiemreap.eot",
155155 ttf: "Khmr/KhmerOSsiemreap.ttf",
156156 woff: "Khmr/KhmerOSsiemreap.woff",
157 - svg: "Khmr/KhmerOSsiemreap.svg",
 157+ svg: "Khmr/KhmerOSsiemreap.svg",
158158 version: "1.10"
159159 },
160160
@@ -241,7 +241,7 @@
242242 eot: "Mymr/MasterpieceUniSans.eot",
243243 ttf: "Mymr/MasterpieceUniSans.ttf",
244244 woff: "Mymr/MasterpieceUniSans.woff",
245 - svg: "Mymr/MasterpieceUniSans.svg",
 245+ svg: "Mymr/MasterpieceUniSans.svg",
246246 version: "0.5"
247247 },
248248
@@ -249,7 +249,7 @@
250250 eot: "Mymr/Myanmar3.eot",
251251 ttf: "Mymr/Myanmar3.ttf",
252252 woff: "Mymr/Myanmar3.woff",
253 - svg: "Mymr/Myanmar3.svg",
 253+ svg: "Mymr/Myanmar3.svg",
254254 version: "3.0"
255255 },
256256
@@ -257,7 +257,7 @@
258258 eot: "Mymr/Padauk-Regular.eot",
259259 ttf: "Mymr/Padauk-Regular.ttf",
260260 woff: "Mymr/Padauk-Regular.woff",
261 - svg: "Mymr/Padauk-Regular.svg",
 261+ svg: "Mymr/Padauk-Regular.svg",
262262 version: "2.8"
263263 },
264264
@@ -265,7 +265,7 @@
266266 eot: "Mymr/Yunghkio.eot",
267267 ttf: "Mymr/Yunghkio.ttf",
268268 woff: "Mymr/Yunghkio.woff",
269 - svg: "Mymr/Yunghkio.svg",
 269+ svg: "Mymr/Yunghkio.svg",
270270 version: "1.0"
271271 },
272272
@@ -297,14 +297,14 @@
298298 version: "2.5.0"
299299 },
300300
301 - Thendral: {
 301+ Thendral: {
302302 eot: "Taml/ThendralUni.eot",
303303 ttf: "Taml/ThendralUni.ttf",
304304 woff: "Taml/ThendralUni.woff",
305305 version: "1.0"
306306 },
307307
308 - Thenee: {
 308+ Thenee: {
309309 eot: "Taml/TheneeUni.eot",
310310 ttf: "Taml/TheneeUni.ttf",
311311 woff: "Taml/TheneeUni.woff",
@@ -353,7 +353,7 @@
354354 am: [ "AbyssinicaSIL" ],
355355 as: [ "Lohit Assamese" ],
356356 bh: [ "Lohit Devanagari" ],
357 - bho: [ "Lohit Devanagari" ],
 357+ bho: [ "Lohit Devanagari" ],
358358 bn: [ "Lohit Bengali" ],
359359 bpy: [ "Lohit Bengali" ],
360360 cdo: [ "Charis SIL" ],
@@ -372,7 +372,7 @@
373373 ml: [ "AnjaliOldLipi" ],
374374 mr: [ "Lohit Devanagari" ],
375375 my: [ "Masterpiece Uni Sans", "Padauk-Regular", "Myanmar3", "Yunghkio" ],
376 - ne: [ "Lohit Devanagari", "Madan" ],
 376+ ne: [ "Lohit Devanagari", "Madan" ],
377377 or: [ "Lohit Oriya" , "Utkal" ],
378378 pa: [ "Lohit Punjabi", "Saab" ],
379379 sa: [ "Lohit Devanagari" ],
@@ -383,5 +383,7 @@
384384 ti: [ "AbyssinicaSIL" ]
385385 }
386386 };
387 - $.extend( mw.webfonts.config, config);
 387+
 388+ $.extend( mw.webfonts.config, config );
 389+
388390 } ) ( jQuery );
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/images/help.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.18wmf1/extensions/WebFonts/resources/images/help.png
___________________________________________________________________
Added: svn:mime-type
389391 + image/png
Index: branches/wmf/1.18wmf1/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: branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.i18n.php
@@ -18,6 +18,8 @@
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',
 23+ 'webfonts-help-page' => '//mediawiki.org/wiki/Special:MyLanguage/Help:Extension:WebFonts',
2224 );
2325
2426 /** Message documentation (Message documentation)
@@ -29,6 +31,8 @@
3032 'webfonts-load' => 'The text shown in the webfont link',
3133 'webfonts-reset' => '{{Identical|Reset}}',
3234 'webfonts-menu-tooltip' => 'Tooltip text displayed in the webfont link',
 35+ 'webfonts-help' => 'Text for the help link',
 36+ 'webfonts-help-page' => 'Change this only if you want to point the help link to a different wiki page.',
3337 );
3438
3539 /** Arabic (العربية)
@@ -348,6 +352,7 @@
349353 'webfonts-reset' => 'പഴയപടിയാക്കുക',
350354 'webfonts-enable-preference' => 'ഫോണ്ട് എംബെഡ് ചെയ്യുക.(വെബ്ഫോണ്ട്സ്)',
351355 'webfonts-menu-tooltip' => 'താളിനുവേണ്ടി ഒരു ഫോണ്ട് തിരഞ്ഞെടുക്കുക',
 356+ 'webfonts-help' => 'സഹായം',
352357 );
353358
354359 /** Marathi (मराठी)
@@ -518,6 +523,7 @@
519524 'webfonts-load' => 'எழுத்துரு மாற்ற',
520525 'webfonts-reset' => 'இயல்பு எழுத்துரு',
521526 'webfonts-enable-preference' => 'எழுத்துரு புதைத்தல் (இணைய எழுத்துருக்களை) பயன்படுத்துக',
 527+ 'webfonts-help' => 'உதவி',
522528 );
523529
524530 /** Tagalog (Tagalog)
Index: branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.php
@@ -37,6 +37,7 @@
3838 $wgHooks['BeforePageDisplay'][] = 'WebFontsHooks::addModules';
3939 $wgHooks['GetPreferences'][] = 'WebFontsHooks::addPreference';
4040 $wgHooks['UserGetDefaultOptions'][] = 'WebFontsHooks::addDefaultOptions';
 41+$wgHooks['ResourceLoaderGetConfigVars'][] = 'WebFontsHooks::addConfig';
4142
4243 $wgWebFontsEnabledByDefault = true;
4344
@@ -57,7 +58,12 @@
5859 ),
5960 'localBasePath' => $dir,
6061 'remoteExtPath' => 'WebFonts',
61 - 'messages' => array( 'webfonts-load', 'webfonts-reset', 'webfonts-menu-tooltip' ),
62 - 'dependencies' => 'jquery.cookie' ,
 62+ 'messages' => array(
 63+ 'webfonts-load',
 64+ 'webfonts-reset',
 65+ 'webfonts-menu-tooltip',
 66+ 'webfonts-help',
 67+ ),
 68+ 'dependencies' => 'jquery.cookie',
6369 'position' => 'top',
6470 );
Index: branches/wmf/1.18wmf1/languages/messages/MessagesCs.php
@@ -48,8 +48,6 @@
4949 );
5050
5151 $namespaceAliases = array(
52 - 'Uživatelka' => NS_USER, # female complement
53 - 'Diskuse_s_uživatelkou' => NS_USER_TALK, # female complement
5452 'Uživatel_diskuse' => NS_USER_TALK, # old literal translation backward compatibility
5553 'Uživatelka_diskuse' => NS_USER_TALK, # female complement to old literal translation style
5654 '$1_diskuse' => NS_PROJECT_TALK, # old literal translation backward compatibility
@@ -60,6 +58,11 @@
6159 'Kategorie_diskuse' => NS_CATEGORY_TALK, # old literal translation backward compatibility
6260 );
6361
 62+$namespaceGenderAliases = array(
 63+ NS_USER => array( 'male' => 'Uživatel', 'female' => 'Uživatelka' ),
 64+ NS_USER_TALK => array( 'male' => 'Diskuse_s_uživatelem', 'female' => 'Diskuse_s_uživatelkou' ),
 65+);
 66+
6467 /**
6568 * Date formats list for Special:Preferences
6669 * see $dateFormats for definitions
Index: branches/wmf/1.18wmf1/languages/messages/MessagesEn.php
@@ -1318,8 +1318,8 @@
13191319 'blocked-notice-logextract' => 'This user is currently blocked.
13201320 The latest block log entry is provided below for reference:',
13211321 'clearyourcache' => "'''Note:''' After saving, you may have to bypass your browser's cache to see the changes.
1322 -* '''Firefox / Safari:''' Hold ''Shift'' while clicking ''Reload'', or press either ''Ctrl-F5'' or ''Ctrl-R'' (''Command-R'' on a Mac)
1323 -* '''Google Chrome:''' Press ''Ctrl-Shift-R'' (''Command-Shift-R'' on a Mac)
 1322+* '''Firefox / Safari:''' Hold ''Shift'' while clicking ''Reload'', or press either ''Ctrl-F5'' or ''Ctrl-R'' (''⌘-R'' on a Mac)
 1323+* '''Google Chrome:''' Press ''Ctrl-Shift-R'' (''⌘-Shift-R'' on a Mac)
13241324 * '''Internet Explorer:''' Hold ''Ctrl'' while clicking ''Refresh'', or press ''Ctrl-F5''
13251325 * '''Konqueror:''' Click ''Reload'' or press ''F5''
13261326 * '''Opera:''' Clear the cache in ''Tools → Preferences''",

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106706[WebFonts] Code quality & clean up...krinkle22:02, 19 December 2011
r106772mw.util.addCSS will make IE version <= 8 crash if the css is a fontface defin...santhosh09:07, 20 December 2011
r107049Better help icon.santhosh09:46, 22 December 2011
r107051Add a help link to WebFonts, pointing to mediawiki.org....santhosh10:01, 22 December 2011
r107056Get the help link from messages based on content language.santhosh11:15, 22 December 2011
r107057Remove webfonts-help-page from resourceloader....santhosh11:35, 22 December 2011
r107067Use ⌘ in for Mac keyboard shortcuts...hashar13:42, 22 December 2011
r107108Make the external URLs to portals like www.wikipedia.org protocol-relativerobin20:28, 22 December 2011
r107138Correct the page link since it is moved in mediawiki.org.santhosh08:40, 23 December 2011
r107270* (bug 33367) Gendered namespaces for Czechnikerabbit12:34, 25 December 2011

Status & tagging log