r92458 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92457‎ | r92458 | r92459 >
Date:19:21, 18 July 2011
Author:kaldari
Status:ok
Tags:
Comment:
making all default types localizable
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.defaultOptions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/WikiLove.php
@@ -83,6 +83,9 @@
8484 // messages for default options, because we want to use them in the default
8585 // options module, but also for the user in the user options module
8686 $wgWikiLoveOptionMessages = array(
 87+ 'wikilove-type-barnstars',
 88+ 'wikilove-type-food',
 89+ 'wikilove-type-kittens',
8790 'wikilove-type-makeyourown',
8891 );
8992
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js
@@ -12,9 +12,9 @@
1313 defaultImage: 'Trophy.png',
1414
1515 types: {
16 - // example type, could be removed later (also no i18n)
 16+ // example type, could be removed later
1717 'barnstar': {
18 - name: 'Barnstars', // name of the type (appears in the types menu)
 18+ name: mw.msg( 'wikilove-type-barnstars' ), // name of the type (appears in the types menu)
1919 select: 'Select a barnstar:', // subtype select label
2020 subtypes: { // some different subtypes
2121 // note that when not using subtypes you should use these subtype options
@@ -240,7 +240,7 @@
241241 icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-barnstar.png' // icon for left-side menu
242242 },
243243 'food': {
244 - name: 'Food and drink', // name of the type (appears in the types menu)
 244+ name: mw.msg( 'wikilove-type-food' ), // name of the type (appears in the types menu)
245245 select: 'Select food or drink item:', // subtype select label
246246 text: '{| style="background-color: $5; border: 1px solid $6;"\n\
247247 |style="vertical-align: middle; padding: 5px;" | [[$3|$4]]\n\
@@ -341,7 +341,7 @@
342342 icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-food.png'
343343 },
344344 'kitten': {
345 - name: 'Kittens',
 345+ name: mw.msg( 'wikilove-type-kittens' ),
346346 fields: [ 'header', 'message' ],
347347 header: 'A kitten for you!',
348348 text: '[[$3|left|150px]]\n$1\n\n~~~~\n<br style="clear: both"/>', // $3 is the image filename
Index: trunk/extensions/WikiLove/WikiLove.i18n.php
@@ -35,6 +35,9 @@
3636 'wikilove-preview' => 'Preview',
3737 'wikilove-notify' => 'Notify the user by e-mail',
3838 'wikilove-button-send' => 'Send WikiLove',
 39+ 'wikilove-type-barnstars' => 'Barnstars',
 40+ 'wikilove-type-food' => 'Food and drink',
 41+ 'wikilove-type-kittens' => 'Kittens',
3942 'wikilove-type-makeyourown' => 'Make your own',
4043 'wikilove-err-header' => 'Please enter a header.',
4144 'wikilove-err-title' => 'Please enter a title.',
@@ -63,6 +66,9 @@
6467 'wikilove-image-example' => 'The filename should be an actual image on Wikimedia Commons.',
6568 'wikilove-button-preview' => 'Button text. Verb.',
6669 'wikilove-preview' => 'Title. Noun.',
 70+ 'wikilove-type-barnstars' => 'Label for a button. Should be no longer than 22 characters.',
 71+ 'wikilove-type-food' => 'Label for a button. Should be no longer than 22 characters.',
 72+ 'wikilove-type-kittens' => 'Label for a button. Should be no longer than 22 characters.',
6773 'wikilove-type-makeyourown' => 'Label for a button. Should be no longer than 22 characters.',
6874 'wikilove-commons-text' => "\$1 gets replaced by a link with ''wikilove-commons-link'' (\"Wikimedia Commons\") as caption and ''wikilove-commons-url'' as URL.",
6975 'wikilove-commons-url' => 'This URL can be changed to point at a localised page on Wikimedia Commons.',

Status & tagging log