r100600 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100599‎ | r100600 | r100601 >
Date:10:54, 24 October 2011
Author:santhosh
Status:ok (Comments)
Tags:
Comment:
Change the negative preference "Disable Webfonts" to postive preference "Enable Webfonts".
Modified paths:
  • /trunk/extensions/WebFonts/WebFonts.hooks.php (modified) (history)
  • /trunk/extensions/WebFonts/WebFonts.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/WebFonts.hooks.php
@@ -11,7 +11,7 @@
1212 public static function addModules( $out, $skin ) {
1313 global $wgUser;
1414
15 - if ( !$wgUser->getOption( 'webfontsDisable' ) ) {
 15+ if ( $wgUser->getOption( 'webfontsEnable' ) ) {
1616 $out->addModules( 'webfonts' );
1717 }
1818
@@ -31,11 +31,12 @@
3232 }
3333
3434 public static function addPreference( $user, &$preferences ) {
35 - // A checkbox in preferences to disable WebFonts
36 - $preferences['webfontsDisable'] = array(
 35+ // A checkbox in preferences to enable WebFonts
 36+ $preferences['webfontsEnable'] = array(
3737 'type' => 'toggle',
38 - 'label-message' => 'webfonts-disable-preference', // a system message
 38+ 'label-message' => 'webfonts-enable-preference', // a system message
3939 'section' => 'rendering/advancedrendering', // under 'Advanced options' section of 'Editing' tab
 40+ 'default' => true
4041 );
4142
4243 return true;
Index: trunk/extensions/WebFonts/WebFonts.i18n.php
@@ -16,7 +16,7 @@
1717 'webfonts-desc' => 'Embed fonts in pages',
1818 'webfonts-load' => 'Select font',
1919 'webfonts-reset' => 'Reset',
20 - 'webfonts-disable-preference' => 'Disable font embedding (WebFonts)',
 20+ 'webfonts-enable-preference' => 'Enable font embedding (WebFonts)',
2121 );
2222
2323 /** Message documentation (Message documentation)
@@ -256,7 +256,7 @@
257257 'webfonts-desc' => 'മീഡിയവിക്കി താളുകളില്‍ ഫോണ്ടുകള്‍ എംബെഡ് ചെയ്യുക',
258258 'webfonts-load' => 'ഫോണ്ടുകള്‍',
259259 'webfonts-reset' => 'പഴയപടിയാക്കുക',
260 - 'webfonts-disable-preference' => 'ഫോണ്ട് എംബെഡ് ചെയ്യൽ (വെബ്ഫോണ്ട്സ്) പ്രവർത്തനരഹിതമാക്കുക',
 260+ 'webfonts-enable-preference' => 'ഫോണ്ട് എംബെഡ് ചെയ്യുക.(വെബ്ഫോണ്ട്സ്)',
261261 );
262262
263263 /** Marathi (मराठी)

Follow-up revisions

RevisionCommit summaryAuthorDate
r100614Set the default preference value of webfontsEnable as true for anonymous and ...santhosh17:00, 24 October 2011

Comments

#Comment by Amire80 (talk | contribs)   14:52, 24 October 2011

It indeed makes more sense that checking a checkbox enables a preference rather than disables it.

#Comment by Nikerabbit (talk | contribs)   18:40, 24 October 2011

+1

Status & tagging log