r90124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90123‎ | r90124 | r90125 >
Date:17:46, 15 June 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
1.17wmf1: Copy WikiLove from trunk
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/WikiLove (added) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.php
@@ -0,0 +1,144 @@
 2+<?php
 3+/**
 4+ * MediaWiki WikiLove extension
 5+ * http://www.mediawiki.org/wiki/Extension:WikiLove
 6+ *
 7+ * This program is free software; you can redistribute it and/or modify
 8+ * it under the terms of the GNU General Public License as published by
 9+ * the Free Software Foundation; either version 2 of the License, or
 10+ * (at your option) any later version.
 11+ *
 12+ * This program is distributed in the hope that it will be useful,
 13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 15+ * GNU General Public License for more details.
 16+ *
 17+ * http://www.gnu.org/copyleft/gpl.html
 18+ *
 19+ * Heart icon by Mark James (Creative Commons Attribution 3.0 License)
 20+ */
 21+
 22+/**
 23+ * @file
 24+ * @ingroup Extensions
 25+ * @author Ryan Kaldari, Jan Paul Posma
 26+ */
 27+
 28+# Alert the user that this is not a valid entry point to MediaWiki if they try to access the file directly.
 29+if ( !defined( 'MEDIAWIKI' ) ) {
 30+ echo <<<EOT
 31+To install this extension, put the following line in LocalSettings.php:
 32+require_once( "\$IP/extensions/WikiLove/WikiLove.php" );
 33+EOT;
 34+ exit( 1 );
 35+}
 36+
 37+// Extension credits that will show up on Special:Version
 38+$wgExtensionCredits['other'][] = array(
 39+ 'path' => __FILE__,
 40+ 'name' => 'WikiLove',
 41+ 'version' => '0.1',
 42+ 'url' => 'http://www.mediawiki.org/wiki/Extension:WikiLove',
 43+ 'author' => array(
 44+ 'Ryan Kaldari', 'Jan Paul Posma'
 45+ ),
 46+ 'descriptionmsg' => 'wikilove-desc',
 47+);
 48+
 49+// default user options
 50+$wgWikiLoveGlobal = false; // enable the extension for all users, removing the user preference
 51+$wgWikiLoveTabIcon = true; // use an icon for skins that support them (i.e. Vector)
 52+$wgWikiLoveLogging = false; // enable logging of giving of WikiLove
 53+
 54+// current directory including trailing slash
 55+$dir = dirname( __FILE__ ) . '/';
 56+
 57+// add autoload classes
 58+$wgAutoloadClasses['WikiLoveApi'] = $dir . 'WikiLove.api.php';
 59+$wgAutoloadClasses['WikiLoveHooks'] = $dir . 'WikiLove.hooks.php';
 60+$wgAutoloadClasses['WikiLoveLocal'] = $dir . 'WikiLove.local.php';
 61+
 62+// i18n messages
 63+$wgExtensionMessagesFiles['WikiLove'] = $dir . 'WikiLove.i18n.php';
 64+
 65+// register hooks
 66+$wgHooks['GetPreferences'][] = 'WikiLoveHooks::getPreferences';
 67+$wgHooks['SkinTemplateNavigation'][] = 'WikiLoveHooks::skinTemplateNavigation';
 68+$wgHooks['SkinTemplateTabs'][] = 'WikiLoveHooks::skinTemplateTabs';
 69+$wgHooks['BeforePageDisplay'][] = 'WikiLoveHooks::beforePageDisplay';
 70+$wgHooks['LoadExtensionSchemaUpdates'][] = 'WikiLoveHooks::loadExtensionSchemaUpdates';
 71+$wgHooks['MakeGlobalVariablesScript'][] = 'WikiLoveHooks::makeGlobalVariablesScript';
 72+
 73+// api modules
 74+$wgAPIModules['wikilove'] = 'WikiLoveApi';
 75+
 76+$extWikiLoveTpl = array(
 77+ 'localBasePath' => dirname( __FILE__ ) . '/modules/ext.wikiLove',
 78+ 'remoteExtPath' => 'WikiLove/modules/ext.wikiLove',
 79+);
 80+
 81+// resources
 82+$wgResourceModules += array(
 83+ 'ext.wikiLove.icon' => $extWikiLoveTpl + array(
 84+ 'styles' => 'ext.wikiLove.icon.css',
 85+ 'position' => 'top',
 86+ ),
 87+ 'ext.wikiLove.startup' => $extWikiLoveTpl + array(
 88+ 'scripts' => array(
 89+ 'ext.wikiLove.core.js',
 90+ 'ext.wikiLove.defaultOptions.js',
 91+ ),
 92+ 'styles' => 'ext.wikiLove.css',
 93+ 'messages' => array(
 94+ 'wikilove-dialog-title',
 95+ 'wikilove-select-type',
 96+ 'wikilove-get-started-header',
 97+ 'wikilove-get-started-list-1',
 98+ 'wikilove-get-started-list-2',
 99+ 'wikilove-get-started-list-3',
 100+ 'wikilove-add-details',
 101+ 'wikilove-image',
 102+ 'wikilove-header',
 103+ 'wikilove-title',
 104+ 'wikilove-enter-message',
 105+ 'wikilove-omit-sig',
 106+ 'wikilove-button-preview',
 107+ 'wikilove-preview',
 108+ 'wikilove-notify',
 109+ 'wikilove-button-send',
 110+ 'wikilove-type-makeyourown',
 111+ 'wikilove-err-header',
 112+ 'wikilove-err-title',
 113+ 'wikilove-err-msg',
 114+ 'wikilove-err-image',
 115+ 'wikilove-err-sig',
 116+ 'wikilove-err-gallery',
 117+ 'wikilove-err-gallery-again',
 118+ ),
 119+ 'dependencies' => array(
 120+ 'jquery.ui.dialog',
 121+ 'jquery.ui.button',
 122+ 'jquery.elastic',
 123+ 'jquery.localize',
 124+ ),
 125+ ),
 126+ 'ext.wikiLove.local' => array(
 127+ 'class' => 'WikiLoveLocal',
 128+ /* for information only, this is actually in the class!
 129+ 'dependencies' => array(
 130+ 'ext.wikiLove.startup',
 131+ ),
 132+ */
 133+ ),
 134+ 'ext.wikiLove.init' => $extWikiLoveTpl + array(
 135+ 'scripts' => 'ext.wikiLove.init.js',
 136+ 'dependencies' => array(
 137+ 'ext.wikiLove.local',
 138+ ),
 139+ ),
 140+ 'jquery.elastic' => array(
 141+ 'localBasePath' => dirname( __FILE__ ) . '/modules/jquery.elastic',
 142+ 'remoteExtPath' => 'WikiLove/modules/jquery.elastic',
 143+ 'scripts' => 'jquery.elastic.js',
 144+ ),
 145+);
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.php
___________________________________________________________________
Added: svn:eol-style
1146 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.hooks.php
@@ -0,0 +1,159 @@
 2+<?php
 3+/**
 4+ * Hooks for WikiLove extension
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+class WikiLoveHooks {
 11+ private static $recipient = '';
 12+
 13+ /**
 14+ * LoadExtensionSchemaUpdates hook
 15+ *
 16+ * @param $updater DatabaseUpdater
 17+ */
 18+ public static function loadExtensionSchemaUpdates( $updater = null ) {
 19+ if ( $updater === null ) {
 20+ global $wgExtNewTables;
 21+ $wgExtNewTables[] = array( 'wikilove_log', dirname( __FILE__ ) . '/patches/WikiLoveLog.sql' );
 22+ } else {
 23+ $updater->addExtensionUpdate( array( 'addTable', 'wikilove_log',
 24+ dirname( __FILE__ ) . '/patches/WikiLoveLog.sql', true ) );
 25+ }
 26+ return true;
 27+ }
 28+
 29+ /**
 30+ * Add the preference in the user preferences with the GetPreferences hook.
 31+ * @param $user User
 32+ * @param $preferences
 33+ */
 34+ public static function getPreferences( $user, &$preferences ) {
 35+ global $wgWikiLoveGlobal;
 36+ if ( !$wgWikiLoveGlobal ) {
 37+ $preferences['wikilove-enabled'] = array(
 38+ 'type' => 'check',
 39+ 'section' => 'editing/labs',
 40+ 'label-message' => 'wikilove-enable-preference',
 41+ );
 42+ }
 43+ return true;
 44+ }
 45+
 46+ /**
 47+ * Adds the required module if we are on a user (talk) page.
 48+ *
 49+ * @param $output
 50+ * @param $skin Skin
 51+ */
 52+ public static function beforePageDisplay( $out, $skin ) {
 53+ global $wgWikiLoveGlobal, $wgUser;
 54+ if ( !$wgWikiLoveGlobal && !$wgUser->getOption( 'wikilove-enabled' ) ) {
 55+ return true;
 56+ }
 57+
 58+ $title = self::getUserTalkPage( $skin->getTitle() );
 59+ if ( !is_null( $title ) ) {
 60+ $out->addModules( 'ext.wikiLove.icon' );
 61+ $out->addModules( 'ext.wikiLove.init' );
 62+ self::$recipient = $title->getText();
 63+ }
 64+ return true;
 65+ }
 66+
 67+ /**
 68+ * Exports wikilove-recipient variable to JS
 69+ */
 70+ public static function makeGlobalVariablesScript( &$vars ) {
 71+ $vars['wikilove-recipient'] = self::$recipient;
 72+ return true;
 73+ }
 74+
 75+ /**
 76+ * Adds a tab the old way (before MW 1.18)
 77+ */
 78+ public static function skinTemplateTabs( $skin, &$contentActions ) {
 79+ self::skinConfigViewsLinks( $skin, $contentActions );
 80+ return true;
 81+ }
 82+
 83+ /**
 84+ * Adds a tab or an icon the new way (MW >1.18)
 85+ */
 86+ public static function skinTemplateNavigation( &$skin, &$links ) {
 87+ if ( self::showIcon( $skin ) ) {
 88+ self::skinConfigViewsLinks( $skin, $links['views']);
 89+ }
 90+ else {
 91+ self::skinConfigViewsLinks( $skin, $links['actions']);
 92+ }
 93+ return true;
 94+ }
 95+
 96+ /**
 97+ * Configure views links.
 98+ * Helper function for SkinTemplateTabs and SkinTemplateNavigation hooks
 99+ * to configure views links.
 100+ *
 101+ * @param $skin Skin
 102+ * @param $views
 103+ */
 104+ private static function skinConfigViewsLinks( $skin, &$views ) {
 105+ global $wgWikiLoveGlobal, $wgUser;
 106+ if ( !$wgWikiLoveGlobal && !$wgUser->getOption( 'wikilove-enabled' ) ) return true;
 107+
 108+ if ( !is_null( self::getUserTalkPage( $skin->getTitle() ) ) ) {
 109+ $views['wikilove'] = array(
 110+ 'text' => wfMsg( 'wikilove-tab-text' ),
 111+ 'href' => '#',
 112+ );
 113+ if ( self::showIcon( $skin ) ) {
 114+ $views['wikilove']['class'] = 'icon';
 115+ $views['wikilove']['primary'] = true;
 116+ }
 117+ }
 118+ }
 119+
 120+ /**
 121+ * Only show an icon when the global preference is enabled and the current skin is Vector.
 122+ *
 123+ * @param $skin Skin
 124+ */
 125+ private static function showIcon( $skin ) {
 126+ global $wgWikiLoveTabIcon;
 127+ return $wgWikiLoveTabIcon && $skin->getSkinName() == 'vector';
 128+ }
 129+
 130+ /**
 131+ * Find the editable talk page of the user we're looking at, or null
 132+ * if such page does not exist.
 133+ *
 134+ * @param $title Title
 135+ *
 136+ * @return Title|null
 137+ */
 138+ public static function getUserTalkPage( $title ) {
 139+ global $wgUser;
 140+ if ( !$wgUser->isLoggedIn() ) {
 141+ return null;
 142+ }
 143+
 144+ $ns = $title->getNamespace();
 145+ // return quickly if we're in the wrong namespace anyway
 146+ if ( $ns != NS_USER && $ns != NS_USER_TALK ) return null;
 147+
 148+ $baseTitle = Title::newFromText( $title->getBaseText(), $ns );
 149+
 150+ if ( $ns == NS_USER_TALK && $baseTitle->quickUserCan( 'edit' ) ) {
 151+ return $baseTitle;
 152+ } elseif ( $ns == NS_USER ) {
 153+ $talk = $baseTitle->getTalkPage();
 154+ if ( $talk->quickUserCan( 'edit' ) ) {
 155+ return $talk;
 156+ }
 157+ }
 158+ return null;
 159+ }
 160+}
\ No newline at end of file
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.hooks.php
___________________________________________________________________
Added: svn:eol-style
1161 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.api.php
@@ -0,0 +1,176 @@
 2+<?php
 3+class WikiLoveApi extends ApiBase {
 4+ public function execute() {
 5+ global $wgRequest, $wgWikiLoveLogging, $wgParser;
 6+
 7+ $params = $this->extractRequestParams();
 8+
 9+ $title = Title::newFromText( $params['title'] );
 10+ if ( is_null( $title ) ) {
 11+ $this->dieUsageMsg( array( 'invaliduser', $params['title'] ) );
 12+ }
 13+
 14+ $talk = WikiLoveHooks::getUserTalkPage( $title );
 15+ if ( is_null( $talk ) ) {
 16+ $this->dieUsageMsg( array( 'invaliduser', $params['title'] ) );
 17+ }
 18+
 19+ if ( $wgWikiLoveLogging ) {
 20+ $this->saveInDb( $talk, $params['subject'], $params['message'], $params['type'], isset( $params['email'] ) ? 1 : 0 );
 21+ }
 22+
 23+ $article = new Article( $talk, 0 );
 24+
 25+ // not using section => 'new' here, as we like to give our own edit summary
 26+ $api = new ApiMain( new FauxRequest( array(
 27+ 'action' => 'edit',
 28+ 'title' => $talk->getFullText(),
 29+ 'text' => $article->replaceSection( 'new', $params['text'], $params['subject'] ),
 30+ 'token' => $params['token'],
 31+ 'summary' => wfMsgForContent( 'wikilove-summary', $wgParser->stripSectionName( $params['subject'] ) ),
 32+ 'notminor' => true,
 33+ ), false, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
 34+
 35+ if ( isset( $params['email'] ) ) {
 36+ $this->emailUser( $talk, $params['subject'], $params['email'], $params['token'] );
 37+ }
 38+
 39+ $api->execute();
 40+
 41+ $result = $api->getResult();
 42+ $data = $result->getData();
 43+
 44+ $this->getResult()->addValue( 'redirect', 'pageName', $talk->getPrefixedDBkey() );
 45+ $this->getResult()->addValue( 'redirect', 'fragment', Title::escapeFragmentForURL( $params['subject'] ) );
 46+ // note that we cannot use Title::makeTitle here as it doesn't sanitize the fragment
 47+ }
 48+
 49+ /**
 50+ * @param $talk Title
 51+ * @param $subject
 52+ * @param $message
 53+ * @param $type
 54+ * @param $email
 55+ * @return void
 56+ */
 57+ private function saveInDb( $talk, $subject, $message, $type, $email ) {
 58+ global $wgUser;
 59+ $dbw = wfGetDB( DB_MASTER );
 60+ $receiver = User::newFromName( $talk->getSubjectPage()->getBaseText() );
 61+ if ( $receiver->isAnon() ) {
 62+ $this->setWarning( 'Not logging anonymous recipients' );
 63+ return;
 64+ }
 65+
 66+ $values = array(
 67+ 'wll_timestamp' => $dbw->timestamp(),
 68+ 'wll_sender' => $wgUser->getId(),
 69+ 'wll_sender_editcount' => $wgUser->getEditCount(),
 70+ 'wll_sender_registration' => $wgUser->getRegistration(),
 71+ 'wll_receiver' => $receiver->getId(),
 72+ 'wll_receiver_editcount' => $receiver->getEditCount(),
 73+ 'wll_receiver_registration' => $receiver->getRegistration(),
 74+ 'wll_type' => $type,
 75+ 'wll_subject' => $subject,
 76+ 'wll_message' => $message,
 77+ 'wll_email' => $email,
 78+ );
 79+
 80+ try{
 81+ $dbw->insert( 'wikilove_log', $values, __METHOD__ );
 82+ } catch( DBQueryError $dbqe ) {
 83+ $this->setWarning( 'Action was not logged' );
 84+ }
 85+ }
 86+
 87+ private function emailUser( $talk, $subject, $text, $token ) {
 88+ global $wgRequest;
 89+ $api = new ApiMain( new FauxRequest( array(
 90+ 'action' => 'emailuser',
 91+ 'target' => User::newFromName( $talk->getSubjectPage()->getBaseText() )->getName(),
 92+ 'subject' => $subject,
 93+ 'text' => $text,
 94+ 'token' => $token,
 95+ ), false, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
 96+ try{
 97+ $api->execute();
 98+ } catch( DBQueryError $dbqe ) {
 99+ $this->setWarning( 'E-mail was not sent' );
 100+ }
 101+ }
 102+
 103+ public function getAllowedParams() {
 104+ return array(
 105+ 'title' => array(
 106+ ApiBase::PARAM_TYPE => 'string',
 107+ ApiBase::PARAM_REQUIRED => true,
 108+ ),
 109+ 'text' => array(
 110+ ApiBase::PARAM_TYPE => 'string',
 111+ ApiBase::PARAM_REQUIRED => true,
 112+ ),
 113+ 'message' => array(
 114+ ApiBase::PARAM_TYPE => 'string',
 115+ ),
 116+ 'token' => array(
 117+ ApiBase::PARAM_TYPE => 'string',
 118+ ApiBase::PARAM_REQUIRED => true,
 119+ ),
 120+ 'subject' => array(
 121+ ApiBase::PARAM_TYPE => 'string',
 122+ ApiBase::PARAM_REQUIRED => true,
 123+ ),
 124+ 'type' => array(
 125+ ApiBase::PARAM_TYPE => 'string',
 126+ ),
 127+ 'email' => array(
 128+ ApiBase::PARAM_TYPE => 'string',
 129+ ),
 130+ );
 131+ }
 132+
 133+ public function getParamDescription() {
 134+ return array(
 135+ 'title' => 'Title of the user or user talk page to send WikiLove to',
 136+ 'text' => 'Raw wikitext to add in the new section',
 137+ 'message' => 'Actual message the user has entered, for logging purposes',
 138+ 'token' => 'Edit token. You can get one of these through prop=info',
 139+ 'subject' => 'Subject header of the new section',
 140+ 'email' => 'Content of the optional e-mail message to send to the user',
 141+ 'type' => array( 'Type of WikiLove (for statistics); this corresponds with a type',
 142+ 'selected in the left menu, and optionally a subtype after that',
 143+ '(e.g. "barnstar-normal" or "kitten")',
 144+ ),
 145+ );
 146+ }
 147+
 148+ public function getDescription() {
 149+ return array(
 150+ 'Give WikiLove to another user.',
 151+ "WikiLove is a positive message posted to a user's talk page through a",
 152+ 'convenient interface with preset or locally defined templates. This action',
 153+ 'adds the specified wikitext to a certain talk page. For statistical purposes,',
 154+ 'the type and other data are logged.',
 155+ );
 156+ }
 157+
 158+ public function getPossibleErrors() {
 159+ return array_merge( parent::getPossibleErrors(), array(
 160+ array( 'invalidtitle', 'title' ),
 161+ array(
 162+ 'code' => 'nologging',
 163+ 'info' => 'Warning: action was not logged!'
 164+ ),
 165+ ) );
 166+ }
 167+
 168+ public function getExamples() {
 169+ return array(
 170+ 'api.php?action=wikilove&title=User:Dummy&text=Love&subject=Hi&token=%2B\\',
 171+ );
 172+ }
 173+
 174+ public function getVersion() {
 175+ return __CLASS__ . ': $Id$';
 176+ }
 177+}
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.api.php
___________________________________________________________________
Added: svn:keywords
1178 + Id
Added: svn:eol-style
2179 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/patches/WikiLoveLog.sql
@@ -0,0 +1,28 @@
 2+--
 3+-- WikiLove logging schema
 4+-- Logs all actions of giving WikiLove.
 5+-- Not final, please apply this patch manually for now!
 6+--
 7+
 8+CREATE TABLE IF NOT EXISTS /*_*/wikilove_log (
 9+ wll_id int NOT NULL PRIMARY KEY auto_increment, -- unique id
 10+ wll_timestamp binary(14) NOT NULL, -- timestamp
 11+ wll_sender int(11) NOT NULL, -- user id of the sender
 12+ wll_sender_registration binary(14) default NULL, -- registration date of the sender
 13+ wll_sender_editcount int(11) default NULL, -- total number of edits for the sender
 14+ wll_receiver int(11) NOT NULL, -- user id of the receiver
 15+ wll_receiver_registration binary(14) default NULL, -- registration date of the receiver
 16+ wll_receiver_editcount int(11) default NULL, -- total number of edits for the receiver
 17+ wll_type varchar(64) NOT NULL, -- type (and subtype) of message
 18+ wll_subject varchar(255) NOT NULL, -- subject line
 19+ wll_message blob NOT NULL, -- actual message
 20+ wll_email bool NOT NULL default '0' -- whether or not a notification mail has been sent
 21+) /*$wgDBTableOptions*/;
 22+
 23+CREATE INDEX /*i*/wll_timestamp ON /*_*/wikilove_log (wll_timestamp);
 24+CREATE INDEX /*i*/wll_type_time ON /*_*/wikilove_log (wll_type, wll_timestamp);
 25+CREATE INDEX /*i*/wll_sender_time ON /*_*/wikilove_log (wll_sender, wll_timestamp);
 26+CREATE INDEX /*i*/wll_receiver_time ON /*_*/wikilove_log (wll_receiver, wll_timestamp);
 27+-- ASSUMPTION: once narrowed down to a single user (sender/receiver), we can afford a filesort
 28+-- as a single users will have only limited WikiLove messages from or to him/her. It's not worth
 29+-- the memory of extra indexes to cover all the combinations (sender/receiver/type => 8 indexes)
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/patches/WikiLoveLog.sql
___________________________________________________________________
Added: svn:eol-style
130 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.local.php
@@ -0,0 +1,17 @@
 2+<?php
 3+/*
 4+ * Custom ResourceLoader module that loads a custom WikiLove.js per-wiki.
 5+ */
 6+class WikiLoveLocal extends ResourceLoaderWikiModule {
 7+ protected function getPages( ResourceLoaderContext $context ) {
 8+ return array(
 9+ 'MediaWiki:WikiLove.js' => array( 'type' => 'script' ),
 10+ );
 11+ }
 12+
 13+ public function getDependencies() {
 14+ return array(
 15+ 'ext.wikiLove.startup',
 16+ );
 17+ }
 18+}
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.local.php
___________________________________________________________________
Added: svn:eol-style
119 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
@@ -0,0 +1,133 @@
 2+/**
 3+* @name Elastic
 4+* @descripton Elastic is jQuery plugin that grow and shrink your textareas automatically
 5+* @version 1.6.5
 6+* @requires jQuery 1.2.6+
 7+*
 8+* @author Jan Jarfalk
 9+* @author-email jan.jarfalk@unwrongest.com
 10+* @author-website http://www.unwrongest.com
 11+*
 12+* @licence MIT License - http://www.opensource.org/licenses/mit-license.php
 13+*
 14+* This file has been downloaded from http://unwrongest.com/projects/elastic/, please notify the author of
 15+* any changes.
 16+*/
 17+
 18+(function(jQuery){
 19+ jQuery.fn.extend({
 20+ elastic: function() {
 21+
 22+ // We will create a div clone of the textarea
 23+ // by copying these attributes from the textarea to the div.
 24+ var mimics = [
 25+ 'paddingTop',
 26+ 'paddingRight',
 27+ 'paddingBottom',
 28+ 'paddingLeft',
 29+ 'fontSize',
 30+ 'lineHeight',
 31+ 'fontFamily',
 32+ 'width',
 33+ 'fontWeight'];
 34+
 35+ return this.each( function() {
 36+
 37+ // Elastic only works on textareas
 38+ if ( this.type != 'textarea' ) {
 39+ return false;
 40+ }
 41+
 42+ var $textarea = jQuery(this),
 43+ $twin = jQuery('<div />').css({'position': 'absolute','display':'none','word-wrap':'break-word'}),
 44+ lineHeight = parseInt($textarea.css('line-height'),10) || parseInt($textarea.css('font-size'),'10'),
 45+ minheight = parseInt($textarea.css('height'),10) || lineHeight*3,
 46+ maxheight = parseInt($textarea.css('max-height'),10) || Number.MAX_VALUE,
 47+ goalheight = 0;
 48+
 49+ // Opera returns max-height of -1 if not set
 50+ if (maxheight < 0) { maxheight = Number.MAX_VALUE; }
 51+
 52+ // Append the twin to the DOM
 53+ // We are going to meassure the height of this, not the textarea.
 54+ $twin.appendTo($textarea.parent());
 55+
 56+ // Copy the essential styles (mimics) from the textarea to the twin
 57+ var i = mimics.length;
 58+ while(i--){
 59+ $twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));
 60+ }
 61+
 62+
 63+ // Sets a given height and overflow state on the textarea
 64+ function setHeightAndOverflow(height, overflow){
 65+ var curratedHeight = Math.floor(parseInt(height,10));
 66+ if($textarea.height() != curratedHeight){
 67+ $textarea.css({'height': curratedHeight + 'px','overflow':overflow});
 68+ }
 69+ }
 70+
 71+
 72+ // This function will update the height of the textarea if necessary
 73+ function update() {
 74+
 75+ // Get curated content from the textarea.
 76+ var textareaContent = $textarea.val().replace(/&/g,'&amp;').replace(/ {2}/g, '&nbsp;').replace(/<|>/g, '&gt;').replace(/\n/g, '<br />');
 77+
 78+ // Compare curated content with curated twin.
 79+ var twinContent = $twin.html().replace(/<br>/ig,'<br />');
 80+
 81+ if(textareaContent+'&nbsp;' != twinContent){
 82+
 83+ // Add an extra white space so new rows are added when you are at the end of a row.
 84+ $twin.html(textareaContent+'&nbsp;');
 85+
 86+ // Change textarea height if twin plus the height of one line differs more than 3 pixel from textarea height
 87+ if(Math.abs($twin.height() + lineHeight - $textarea.height()) > 3){
 88+
 89+ var goalheight = $twin.height()+lineHeight;
 90+ if(goalheight >= maxheight) {
 91+ setHeightAndOverflow(maxheight,'auto');
 92+ } else if(goalheight <= minheight) {
 93+ setHeightAndOverflow(minheight,'hidden');
 94+ } else {
 95+ setHeightAndOverflow(goalheight,'hidden');
 96+ }
 97+
 98+ }
 99+
 100+ }
 101+
 102+ }
 103+
 104+ // Hide scrollbars
 105+ $textarea.css({'overflow':'hidden'});
 106+
 107+ // Update textarea size on keyup, change, cut and paste
 108+ $textarea.bind('keyup change cut paste', function(){
 109+ update();
 110+ });
 111+
 112+ // Compact textarea on blur
 113+ // Lets animate this....
 114+ $textarea.bind('blur',function(){
 115+ if($twin.height() < maxheight){
 116+ if($twin.height() > minheight) {
 117+ $textarea.height($twin.height());
 118+ } else {
 119+ $textarea.height(minheight);
 120+ }
 121+ }
 122+ });
 123+
 124+ // And this line is to catch the browser paste event
 125+ $textarea.live('input paste',function(e){ setTimeout( update, 250); });
 126+
 127+ // Run update once when elastic is initialized
 128+ update();
 129+
 130+ });
 131+
 132+ }
 133+ });
 134+})(jQuery);
\ No newline at end of file
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
___________________________________________________________________
Added: svn:eol-style
1135 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css
@@ -0,0 +1,338 @@
 2+/* dialog */
 3+#mw-wikilove-dialog {
 4+ margin: 10px;
 5+}
 6+
 7+/* dialog type selection */
 8+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type {
 9+ float: left;
 10+ width: 250px;
 11+}
 12+
 13+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type ul {
 14+ list-style: none;
 15+ margin: 0;
 16+ padding: 0;
 17+}
 18+
 19+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type ul li,
 20+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a
 21+{
 22+ display: block;
 23+ width: 250px;
 24+ height: 66px;
 25+ padding: 0;
 26+ margin: 0;
 27+ position: relative;
 28+ text-decoration: none;
 29+ outline: none;
 30+}
 31+
 32+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:hover,
 33+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:focus {
 34+ text-decoration:none;
 35+}
 36+
 37+/* IGNORED BY IE6 */
 38+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type ul > li,
 39+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type ul li > a {
 40+ display: inline-block;
 41+}
 42+
 43+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-left-cap,
 44+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-right-cap {
 45+ padding: 0;
 46+ margin: 0;
 47+ width: 6px;
 48+ height: 66px;
 49+ position: absolute;
 50+ top: 0px;
 51+}
 52+
 53+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-left-cap,
 54+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-right-cap,
 55+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-icon-box {
 56+ /* @embed */
 57+ background-image: url(images/select-sprite.png);
 58+ background-repeat: no-repeat;
 59+}
 60+
 61+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-left-cap {
 62+ /* @noflip */
 63+ left: 0px;
 64+ background-position: 0px 0px;
 65+}
 66+
 67+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:hover .mw-wikilove-left-cap,
 68+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:focus .mw-wikilove-left-cap {
 69+ background-position: -6px 0px;
 70+}
 71+
 72+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a.selected .mw-wikilove-left-cap {
 73+ background-position: -12px 0px;
 74+}
 75+
 76+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-right-cap {
 77+ /* @noflip */
 78+ right: 0px;
 79+ background-position: -18px 0px;
 80+}
 81+
 82+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:hover .mw-wikilove-right-cap,
 83+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:focus .mw-wikilove-right-cap {
 84+ background-position: -25px 0px;
 85+}
 86+
 87+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a.selected .mw-wikilove-right-cap {
 88+ background-position: -32px 0px;
 89+}
 90+
 91+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-inside {
 92+ padding: 0;
 93+ margin: 0;
 94+ width: 238px;
 95+ height: 66px;
 96+ position: absolute;
 97+ top: 0px;
 98+ left: 6px;
 99+
 100+ /* @embed */
 101+ background-image: url(images/select-bg-sprite.png);
 102+ background-position: 0px 0px;
 103+ background-repeat: repeat-x;
 104+}
 105+
 106+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:hover .mw-wikilove-inside,
 107+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:focus .mw-wikilove-inside {
 108+ background-position: 0px -66px;
 109+}
 110+
 111+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a.selected .mw-wikilove-inside {
 112+ background-position: 0px -132px;
 113+}
 114+
 115+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-icon-box {
 116+ padding: 0;
 117+ margin: 0;
 118+ width: 53px;
 119+ height: 53px;
 120+ position: absolute;
 121+ left: 0px;
 122+ top: 5px;
 123+ background-position: -42px 0px;
 124+}
 125+
 126+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-icon-box img {
 127+ padding: 0;
 128+ margin: 0;
 129+ width: 53px;
 130+ height: 53px;
 131+ position: absolute:
 132+ top: 0px;
 133+ left: 0px;
 134+}
 135+
 136+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:hover .mw-wikilove-icon-box,
 137+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a:focus .mw-wikilove-icon-box {
 138+ background-position: -97px 0px;
 139+}
 140+
 141+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a.selected .mw-wikilove-icon-box {
 142+ background-position: -152px 0px;
 143+}
 144+
 145+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-link-text {
 146+ padding: 0;
 147+ margin: 0;
 148+ width: 170px;
 149+ height: 53px;
 150+ position: absolute;
 151+ left: 64px;
 152+ top: 5px;
 153+ line-height: 53px;
 154+ font-size: 1.2em;
 155+ font-weight: bold;
 156+ text-decoration: none;
 157+ color: white;
 158+}
 159+
 160+/*#mw-wikilove-dialog*/ #mw-wikilove-select-type a .mw-wikilove-no-icon .mw-wikilove-link-text {
 161+ left: 3px;
 162+}
 163+
 164+/* dialog get started */
 165+/*#mw-wikilove-dialog*/ #mw-wikilove-get-started {
 166+ float: right;
 167+ width: 380px;
 168+ margin-top: 40px;
 169+ padding-top: 4px;
 170+ padding-left: 70px;
 171+ font-size: 1.1em;
 172+
 173+ /* @embed */
 174+ background-image: url(images/get-started-ltr.png);
 175+ background-position: top left;
 176+ background-repeat: no-repeat;
 177+}
 178+
 179+/*#mw-wikilove-dialog*/ #mw-wikilove-get-started h2 {
 180+ border: none;
 181+ font-weight: bold;
 182+}
 183+
 184+/*#mw-wikilove-dialog*/ #mw-wikilove-get-started ol {
 185+ margin-left: 1.5em;
 186+}
 187+
 188+/* dialog add details */
 189+/*#mw-wikilove-dialog*/ #mw-wikilove-add-details {
 190+ float: right;
 191+ width: 480px;
 192+ margin-bottom: 5px;
 193+}
 194+
 195+/*#mw-wikilove-dialog*/ #mw-wikilove-add-details label {
 196+ font-weight: bold;
 197+ font-size: 1.1em;
 198+}
 199+
 200+/*#mw-wikilove-dialog*/ #mw-wikilove-add-details .text {
 201+ display: block;
 202+ width: 300px;
 203+}
 204+
 205+/*#mw-wikilove-dialog #mw-wikilove-add-details*/ #mw-wikilove-subtype-description {
 206+ margin: 5px 0px 8px 15px;
 207+ font-size: 1.0em;
 208+ line-height: 1.2em;
 209+}
 210+
 211+/*#mw-wikilove-dialog*/ #mw-wikilove-add-details .mw-wikilove-note {
 212+ font-weight: light;
 213+ font-size: 0.9em;
 214+ float: right;
 215+ color: #999;
 216+}
 217+
 218+/*#mw-wikilove-dialog*/ #mw-wikilove-add-details textarea {
 219+ resize: none;
 220+}
 221+
 222+/* add details gallery */
 223+/*#mw-wikilove-dialog*/ #mw-wikilove-gallery {
 224+ min-height: 40px;
 225+ position: relative;
 226+}
 227+
 228+/*#mw-wikilove-dialog #mw-wikilove-gallery*/ #mw-wikilove-gallery-error {
 229+ margin-left: 15px;
 230+}
 231+
 232+/*#mw-wikilove-dialog #mw-wikilove-gallery #mw-wikilove-gallery-error*/ #mw-wikilove-gallery-error-again {
 233+ color: #0645AD;
 234+}
 235+
 236+/*#mw-wikilove-dialog*/ #mw-wikilove-gallery img {
 237+ margin-right: 5px;
 238+ margin-bottom: 5px;
 239+ padding: 5px;
 240+}
 241+
 242+/*#mw-wikilove-dialog*/ #mw-wikilove-gallery a:hover img,
 243+/*#mw-wikilove-dialog*/ #mw-wikilove-gallery a:focus img {
 244+ background-color: #aacfe9;
 245+}
 246+
 247+/*#mw-wikilove-dialog*/ #mw-wikilove-gallery a.selected img {
 248+ background-color: #f56427;
 249+}
 250+
 251+/*#mw-wikilove-dialog*/ #mw-wikilove-gallery-spinner {
 252+ float: none;
 253+ position: absolute;
 254+ top: 0;
 255+ left: 50%;
 256+ margin-left: -8px;
 257+ z-index: -1;
 258+}
 259+
 260+/* dialog preview */
 261+/*#mw-wikilove-dialog*/ #mw-wikilove-preview {
 262+ float: right;
 263+ width: 480px;
 264+}
 265+
 266+/*#mw-wikilove-dialog #mw-wikilove-preview*/ #mw-wikilove-preview-area {
 267+ margin-left: 15px;
 268+ width: 465px;
 269+ overflow: auto;
 270+}
 271+
 272+/*#mw-wikilove-dialog #mw-wikilove-preview*/ #mw-wikilove-preview-area .editsection {
 273+ display: none;
 274+}
 275+
 276+/* dialog misc */
 277+#mw-wikilove-dialog input[type=text],
 278+#mw-wikilove-dialog textarea,
 279+#mw-wikilove-dialog select {
 280+ margin: 5px 0px 5px 15px;
 281+ max-width: 460px;
 282+ display: block;
 283+}
 284+
 285+#mw-wikilove-dialog input[type=checkbox] {
 286+ display:inline-box;
 287+ margin: 5px 0px 5px 0px;
 288+}
 289+
 290+#mw-wikilove-dialog select {
 291+ padding: 1px 0;
 292+}
 293+
 294+#mw-wikilove-dialog .submit {
 295+ float: right;
 296+}
 297+
 298+#mw-wikilove-dialog .mw-wikilove-spinner {
 299+ float: right;
 300+ margin-top: 0.9em;
 301+ display: none;
 302+
 303+ /* @embed */
 304+ background-image: url(images/spinner.gif);
 305+ background-position: 0px 0px;
 306+ background-repeat: repeat-x;
 307+ width: 16px;
 308+ height: 16px;
 309+}
 310+
 311+#mw-wikilove-dialog .mw-wikilove-number {
 312+ color: white;
 313+ float: left;
 314+ display: block;
 315+ width: 32px;
 316+ height: 32px;
 317+ line-height: 32px;
 318+ text-align: center;
 319+ margin-right: 5px;
 320+ font-size: 18px;
 321+ font-weight: bold;
 322+
 323+ /* @embed */
 324+ background-image: url(images/number.png);
 325+ background-position: center;
 326+ background-repeat: no-repeat;
 327+}
 328+
 329+#mw-wikilove-dialog .mw-wikilove-error {
 330+ /* @embed */
 331+ background-image: url(images/alert.png);
 332+ background-position: center left;
 333+ background-repeat: no-repeat;
 334+ color: red;
 335+ font-weight: bold;
 336+ line-height: 32px;
 337+ padding-left: 34px;
 338+ padding-bottom: 3px;
 339+}
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css
___________________________________________________________________
Added: svn:eol-style
1340 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js
@@ -0,0 +1,301 @@
 2+( function( $ ) {
 3+$.wikiLove.optionsHook = function() { return {
 4+ defaultText: '{| style="background-color: $5; border: 1px solid $6;"\n\
 5+|rowspan="2" style="vertical-align: middle; padding: 5px;" | [[File:$3|$4]]\n\
 6+|style="font-size: x-large; padding: 3px; height: 1.5em;" | \'\'\'$2\'\'\'\n\
 7+|-\n\
 8+|style="vertical-align: middle; padding: 3px;" | $1 ~~~~\n\
 9+|}',
 10+ defaultBackgroundColor: '#fdffe7',
 11+ defaultBorderColor: '#fceb92',
 12+ defaultImageSize: '100px',
 13+ defaultImage: 'Emblem-fun.svg',
 14+
 15+ types: {
 16+ // example type, could be removed later (also no i18n)
 17+ 'barnstar': {
 18+ name: 'Barnstar', // name of the type (appears in the types menu)
 19+ select: 'Select a barnstar:', // subtype select label
 20+ subtypes: { // some different subtypes
 21+ // note that when not using subtypes you should use these subtype options
 22+ // for the top-level type
 23+ 'original': {
 24+ fields: [ 'notify' ], // fields to ask for in form
 25+ option: 'Original Barnstar', // option listed in the select list
 26+ descr: 'This barnstar is given to recognize particularly fine contributions to Wikipedia, to let people know that their hard work is seen and appreciated.', // description
 27+ header: 'A barnstar for you!', // header that appears at the top of the talk page post (optional)
 28+ title: 'The Original Barnstar', // title that appears inside the award box (optional)
 29+ image: 'Original Barnstar Hires.png', // image for the award
 30+ email: 'Hello $7!\n\nI just awarded you a barnstar.' // message to use in eemail notification; $7 is replaced by the recipient's username
 31+ },
 32+ 'admins': {
 33+ fields: [ 'notify' ],
 34+ option: 'Admin\'s Barnstar',
 35+ descr: 'The Admin\'s Barnstar may be awarded to an administrator who made a particularly difficult decision or performed a tedious but needed admin task.',
 36+ header: 'A barnstar for you!',
 37+ title: 'The Admin\'s Barnstar',
 38+ image: 'Administrator Barnstar Hires.png',
 39+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 40+ },
 41+ 'antivandalism': {
 42+ fields: [ 'notify' ],
 43+ option: 'Anti-Vandalism Barnstar',
 44+ descr: 'The Anti-Vandalism Barnstar may be awarded to those who show great contributions to protecting and reverting attacks of vandalism on Wikipedia.',
 45+ header: 'A barnstar for you!',
 46+ title: 'The Anti-Vandalism Barnstar',
 47+ image: 'Barnstar of Reversion Hires.png',
 48+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 49+ },
 50+ 'diligence': {
 51+ fields: [ 'notify' ],
 52+ option: 'Barnstar of Diligence',
 53+ descr: 'The Barnstar of Diligence may be awarded in recognition of a combination of extraordinary scrutiny, precision and community service.',
 54+ header: 'A barnstar for you!',
 55+ title: 'The Barnstar of Diligence',
 56+ image: 'Barnstar of Diligence Hires.png',
 57+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 58+ },
 59+ 'diplomacy': {
 60+ fields: [ 'notify' ],
 61+ option: 'Barnstar of Diplomacy',
 62+ descr: 'The Barnstar of Diplomacy is awarded to users who have helped to resolve, peacefully, conflicts on Wikipedia.',
 63+ header: 'A barnstar for you!',
 64+ title: 'The Barnstar of Diplomacy',
 65+ image: 'Peace Barnstar Hires.png',
 66+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 67+ },
 68+ 'goodhumor': {
 69+ fields: [ 'notify' ],
 70+ option: 'Barnstar of Good Humor',
 71+ descr: 'The Barnstar of Good Humor may be awarded to Wikipedians who consistently lighten the mood, defuse conflicts, and make Wikipedia a better place to be.',
 72+ header: 'A barnstar for you!',
 73+ title: 'The Barnstar of Good Humor',
 74+ image: 'Barnstar of Reversion Hires.png',
 75+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 76+ },
 77+ 'brilliant': {
 78+ fields: [ 'notify' ],
 79+ option: 'Brilliant Idea Barnstar',
 80+ descr: 'The Brilliant Idea Barnstar may be awarded to a user who figures out an elegant solution to a particularly difficult problem.',
 81+ header: 'A barnstar for you!',
 82+ title: 'The Brilliant Idea Barnstar',
 83+ image: 'Brilliant Idea Barnstar Hires.png',
 84+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 85+ },
 86+ 'citation': {
 87+ fields: [ 'notify' ],
 88+ option: 'Citation Barnstar',
 89+ descr: 'The Citation Barnstar is awarded to users who provide references and in-line citations to previously unsourced articles.',
 90+ header: 'A barnstar for you!',
 91+ title: 'The Citation Barnstar',
 92+ image: 'Citation Barnstar Hires.png',
 93+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 94+ },
 95+ 'civility': {
 96+ fields: [ 'notify' ],
 97+ option: 'Civility Barnstar',
 98+ descr: 'The Civility Barnstar may be awarded to any user who excels at maintaining civility in the midst of contentious situations.',
 99+ header: 'A barnstar for you!',
 100+ title: 'The Civility Barnstar',
 101+ image: 'Civility Barnstar Hires.png',
 102+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 103+ },
 104+ 'copyeditor': {
 105+ fields: [ 'notify' ],
 106+ option: 'Copyeditor\'s Barnstar',
 107+ descr: 'The Copyeditor\'s Barnstar is awarded for excellence in correcting spelling, grammar, punctuation, and style issues.',
 108+ header: 'A barnstar for you!',
 109+ title: 'The Copyeditor\'s Barnstar',
 110+ image: 'Copyeditor Barnstar Hires.png',
 111+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 112+ },
 113+ 'defender': {
 114+ fields: [ 'notify' ],
 115+ option: 'Defender of the Wiki Barnstar',
 116+ descr: 'The Defender of the Wiki may be awarded to those who have gone above and beyond to prevent Wikipedia from being used for fraudulent purposes.',
 117+ header: 'A barnstar for you!',
 118+ title: 'The Defender of the Wiki Barnstar',
 119+ image: 'WikiDefender Barnstar Hires.png',
 120+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 121+ },
 122+ 'editors': {
 123+ fields: [ 'notify' ],
 124+ option: 'Editor\'s Barnstar',
 125+ descr: 'The Editor\'s Barnstar is awarded to individuals who display particularly fine decisions in general editing.',
 126+ header: 'A barnstar for you!',
 127+ title: 'The Editor\'s Barnstar',
 128+ image: 'Editors Barnstar Hires.png',
 129+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 130+ },
 131+ 'designers': {
 132+ fields: [ 'notify' ],
 133+ option: 'Graphic Designer\'s Barnstar',
 134+ descr: 'The Graphic Designer\'s Barnstar may be awarded to those who work tirelessly to provide Wikipedia with free, high-quality graphics.',
 135+ header: 'A barnstar for you!',
 136+ title: 'The Graphic Designer\'s Barnstar',
 137+ image: 'Rosetta Barnstar Hires.png',
 138+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 139+ },
 140+ 'half': {
 141+ fields: [ 'notify' ],
 142+ option: 'Half Barnstar',
 143+ descr: 'The Half Barnstar is awarded for excellence in cooperation, especially for productive editing with someone who holds an opposing viewpoint.',
 144+ header: 'A barnstar for you!',
 145+ title: 'The Half Barnstar',
 146+ image: 'Halfstar Hires.png',
 147+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 148+ },
 149+ 'minor': {
 150+ fields: [ 'notify' ],
 151+ option: 'Minor Barnstar',
 152+ descr: 'Minor edits are often overlooked, but are essential contributions to Wikipedia. The Minor Barnstar is awarded for making minor edits of the utmost quality.',
 153+ header: 'A barnstar for you!',
 154+ title: 'The Minor barnstar',
 155+ image: 'Minor Barnstar Hires.png',
 156+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 157+ },
 158+ 'antispam': {
 159+ fields: [ 'notify' ],
 160+ option: 'No Spam Barnstar',
 161+ descr: 'The Anti-Spam Barnstar is awarded to users who do an exceptional job fighting against spam on Wikipedia.',
 162+ header: 'A barnstar for you!',
 163+ title: 'The No Spam Barnstar',
 164+ image: 'No Spam Barnstar Hires.png',
 165+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 166+ },
 167+ 'photographers': {
 168+ fields: [ 'notify' ],
 169+ option: 'Photographer\'s Barnstar',
 170+ descr: 'The Photographer\'s Barnstar is awarded to those individuals who tirelessly improve the Wikipedia with their photographic skills and contributions.',
 171+ header: 'A barnstar for you!',
 172+ title: 'The Photographer\'s Barnstar',
 173+ image: 'Camera Barnstar Hires.png',
 174+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 175+ },
 176+ 'kindness': {
 177+ fields: [ 'notify' ],
 178+ option: 'Random Acts of Kindness Barnstar',
 179+ descr: 'The Random Acts of Kindness Barnstar may be awarded to those that show a pattern of going the extra mile to be nice, without being asked.',
 180+ header: 'A barnstar for you!',
 181+ title: 'The Random Acts of Kindness barnstar',
 182+ image: 'Kindness Barnstar Hires.png',
 183+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 184+ },
 185+ 'reallife': {
 186+ fields: [ 'notify' ],
 187+ option: 'Real Life Barnstar',
 188+ descr: 'The Real Life Barnstar is awarded to editors who make contributions both online and offline, by organizing wiki-related real-life events.',
 189+ header: 'A barnstar for you!',
 190+ title: 'The Real Life Barnstar',
 191+ image: 'Real Life Barnstar.jpg',
 192+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 193+ },
 194+ 'resilient': {
 195+ fields: [ 'notify' ],
 196+ option: 'Resilient Barnstar',
 197+ descr: 'The Resilient Barnstar may be given to any editor who learns and improves from criticisms, never letting mistakes impede their growth as a Wikipedian.',
 198+ header: 'A barnstar for you!',
 199+ title: 'The Resilient Barnstar',
 200+ image: 'Resilient Barnstar Hires.png',
 201+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 202+ },
 203+ 'rosetta': {
 204+ fields: [ 'notify' ],
 205+ option: 'Rosetta Barnstar',
 206+ descr: 'The Rosetta Barnstar may be given to any editor who exhibits outstanding translation efforts on Wikipedia.',
 207+ header: 'A barnstar for you!',
 208+ title: 'The Rosetta Barnstar',
 209+ image: 'Rosetta Barnstar Hires.png',
 210+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 211+ },
 212+ 'special': {
 213+ fields: [ 'notify' ],
 214+ option: 'Special Barnstar',
 215+ descr: 'The Special Barnstar may be awarded to a user as a gesture of appreciation when there is no other barnstar which would be appropriate.',
 216+ header: 'A barnstar for you!',
 217+ title: 'The Special Barnstar',
 218+ image: 'Special Barnstar Hires.png',
 219+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 220+ },
 221+ 'surreal': {
 222+ fields: [ 'notify' ],
 223+ option: 'Surreal Barnstar',
 224+ descr: 'The Surreal Barnstar may be awarded to any Wikipedian who adds "special flavor" to the community by acting as a sort of wildcard.',
 225+ header: 'A barnstar for you!',
 226+ title: 'The Surreal Barnstar',
 227+ image: 'Surreal Barnstar Hires.png',
 228+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 229+ },
 230+ 'teamwork': {
 231+ fields: [ 'notify' ],
 232+ option: 'Teamwork Barnstar',
 233+ descr: 'The Teamwork Barnstar may be awarded when several editors work together to improve an article.',
 234+ header: 'A barnstar for you!',
 235+ title: 'The Teamwork Barnstar',
 236+ image: 'Team Barnstar Hires.png',
 237+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 238+ },
 239+ 'technical': {
 240+ fields: [ 'notify' ],
 241+ option: 'Technical Barnstar',
 242+ descr: 'The Technical Barnstar may be awarded to anyone who has enhanced Wikipedia through their technical work (programming, bot building, link repair, etc.).',
 243+ header: 'A barnstar for you!',
 244+ title: 'The Technical Barnstar',
 245+ image: 'Vitruvian Barnstar Hires.png',
 246+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 247+ },
 248+ 'tireless': {
 249+ fields: [ 'notify' ],
 250+ option: 'Tireless Contributor Barnstar',
 251+ descr: 'The Tireless Contributor Barnstar is awarded to especially tireless Wikipedians who contribute an especially large body of work without sacrificing quality.',
 252+ header: 'A barnstar for you!',
 253+ title: 'The Tireless Contributor Barnstar',
 254+ image: 'Tireless Contributor Barnstar Hires.gif',
 255+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 256+ },
 257+ 'writers': {
 258+ fields: [ 'notify' ],
 259+ option: 'Writer\'s Barnstar',
 260+ descr: 'The Writer\'s Barnstar may be awarded to any user who has written a large number of articles or has contributed a large number of edits.',
 261+ header: 'A barnstar for you!',
 262+ title: 'The Writer\'s Barnstar',
 263+ image: 'Writers Barnstar Hires.png',
 264+ email: 'Hello $7!\n\nI just awarded you a barnstar.'
 265+ }
 266+ },
 267+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-barnstar.png' // icon for left-side menu
 268+ },
 269+ 'beer': {
 270+ name: 'Beer',
 271+ fields: [ 'header' ],
 272+ header: 'A beer for you!',
 273+ text: '[[$3|left|150px]]\n$1\n\n~~~~\n<br style="clear: both"/>', // custom text
 274+ gallery: {
 275+ imageList: [ 'Cruzcampo.jpg', 'Glass_of_la_trappe_quadrupel.jpg', 'Hefeweizen.jpg', 'Krušovice_Mušketýr_in_glass.JPG', 'NCI_Visuals_Food_Beer.jpg', 'PintJug.jpg' ],
 276+ width: 145,
 277+ number: 3
 278+ },
 279+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-beer.png' // icon for left-side menu
 280+ },
 281+ 'kitten': {
 282+ name: 'Kitten',
 283+ fields: [ 'header' ],
 284+ header: 'A kitten for you!',
 285+ text: '[[$3|left|150px]]\n$1\n\n~~~~\n<br style="clear: both"/>', // $3 is the image filename
 286+ gallery: {
 287+ imageList: [ 'Cucciolo gatto Bibo.jpg','Kitten (06) by Ron.jpg','Kitten-stare.jpg', 'Cat03.jpg', 'Kot_Leon.JPG', 'Greycat.jpg' ],
 288+ width: 145,
 289+ number: 3
 290+ },
 291+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-kitten.png' // icon for left-side menu
 292+ },
 293+ // default type, nice to leave this one in place when adding other types
 294+ 'makeyourown': {
 295+ name: mw.msg( 'wikilove-type-makeyourown' ),
 296+ fields: [ 'header', 'title', 'image', 'notify' ],
 297+ imageSize: '150px',
 298+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-create.png' // icon for left-side menu
 299+ }
 300+ }
 301+}; };
 302+} )( jQuery );
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js
___________________________________________________________________
Added: svn:eol-style
1303 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.init.js
@@ -0,0 +1,3 @@
 2+( function( $ ) {
 3+$( document ).ready( $.wikiLove.init );
 4+} )( jQuery );
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.init.js
___________________________________________________________________
Added: svn:eol-style
15 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons.png
___________________________________________________________________
Added: svn:mime-type
26 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/spinner.gif
Cannot display: file marked as a binary type.
svn:mime-type = image/gif
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/spinner.gif
___________________________________________________________________
Added: svn:mime-type
37 + image/gif
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/get-started-ltr.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/get-started-ltr.png
___________________________________________________________________
Added: svn:mime-type
48 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/get-started-rtl.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/get-started-rtl.png
___________________________________________________________________
Added: svn:mime-type
59 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart.png
___________________________________________________________________
Added: svn:mime-type
610 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/select-sprite.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/select-sprite.png
___________________________________________________________________
Added: svn:mime-type
711 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-hover.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-hover.png
___________________________________________________________________
Added: svn:mime-type
812 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/alert.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/alert.png
___________________________________________________________________
Added: svn:mime-type
913 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-create.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-create.png
___________________________________________________________________
Added: svn:mime-type
1014 + application/octet-stream
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-cookie.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-cookie.png
___________________________________________________________________
Added: svn:mime-type
1115 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-wikiproject.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-wikiproject.png
___________________________________________________________________
Added: svn:mime-type
1216 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-welcome.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-welcome.png
___________________________________________________________________
Added: svn:mime-type
1317 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-barnstar.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-barnstar.png
___________________________________________________________________
Added: svn:mime-type
1418 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-beer.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-beer.png
___________________________________________________________________
Added: svn:mime-type
1519 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-kitten.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-kitten.png
___________________________________________________________________
Added: svn:mime-type
1620 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/number.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/number.png
___________________________________________________________________
Added: svn:mime-type
1721 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/tab-break.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/tab-break.png
___________________________________________________________________
Added: svn:mime-type
1822 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/select-bg-sprite.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/select-bg-sprite.png
___________________________________________________________________
Added: svn:mime-type
1923 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css
@@ -0,0 +1,42 @@
 2+/* include fix from r87101 here for older versions; these three blocks can become deprecated later */
 3+div.vectorTabs span {
 4+ display: inline-block;
 5+ /* @embed */
 6+ background-image: url(images/tab-break.png);
 7+ background-position: bottom right;
 8+ background-repeat: no-repeat;
 9+}
 10+
 11+div.vectorTabs li a {
 12+ background-image: none;
 13+}
 14+
 15+#ca-unwatch.icon,
 16+#ca-watch.icon {
 17+ margin-right: 0px;
 18+}
 19+
 20+/* icon style */
 21+#ca-wikilove.icon a {
 22+ margin: 0;
 23+ padding: 0;
 24+ outline: none;
 25+ display: block;
 26+ width: 27px;
 27+ /* This hides the text but shows the background image */
 28+ padding-top: 3.1em;
 29+ margin-top: 0;
 30+ /* Only applied in IE6 */
 31+ margin-top: -0.8em !ie;
 32+ height: 0;
 33+ overflow: hidden;
 34+ /* @embed */
 35+ background-image: url(images/heart-icons.png);
 36+}
 37+#ca-wikilove.icon a {
 38+ background-position: 5px 60%;
 39+}
 40+#ca-wikilove.icon a:hover,
 41+#ca-wikilove.icon a:focus {
 42+ background-position: -19px 60%;
 43+}
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css
___________________________________________________________________
Added: svn:eol-style
144 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -0,0 +1,620 @@
 2+( function( $ ) {
 3+$.wikiLove = (function(){
 4+
 5+var options = {}, // options modifiable by the user
 6+ $dialog = null, // dialog jQuery object
 7+ currentTypeId = null, // id of the currently selected type (e.g. 'barnstar' or 'makeyourown')
 8+ currentSubtypeId = null, // id of the currently selected subtype (e.g. 'original' or 'special')
 9+ currentTypeOrSubtype = null, // content of the current (sub)type (i.e. an object with title, descr, text, etc.)
 10+ previewData = null, // data of the currently previewed thing is set here
 11+ emailable = false,
 12+ gallery = {};
 13+
 14+return {
 15+ optionsHook: function() { return {}; }, // hook that can be overridden by the user to modify options
 16+
 17+ /*
 18+ * Opens the dialog and builds it if necessary.
 19+ */
 20+ openDialog: function() {
 21+ if ( $dialog === null ) {
 22+ // Test to see if the 'E-mail this user' link exists
 23+ emailable = $( '#t-emailuser' ).length ? true : false;
 24+
 25+ // Build a type list like this:
 26+ var $typeList = $( '<ul id="mw-wikilove-types"></ul>' );
 27+ for( var typeId in options.types ) {
 28+ var $button = $( '<a href="#"></a>' );
 29+ var $buttonInside = $( '<div class="mw-wikilove-inside"></div>' );
 30+
 31+ if( typeof options.types[typeId].icon == 'string' ) {
 32+ $buttonInside.append( '<div class="mw-wikilove-icon-box"><img src="'
 33+ + mw.html.escape( options.types[typeId].icon ) + '"/></div>' );
 34+ }
 35+ else {
 36+ $buttonInside.addClass( 'mw-wikilove-no-icon' );
 37+ }
 38+
 39+ $buttonInside.append( '<div class="mw-wikilove-link-text">' + options.types[typeId].name + '</div>' );
 40+
 41+ $button.append( '<div class="mw-wikilove-left-cap"></div>');
 42+ $button.append( $buttonInside );
 43+ $button.append( '<div class="mw-wikilove-right-cap"></div>');
 44+ $button.data( 'typeId', typeId );
 45+ $typeList.append( $( '<li tabindex="0"></li>' ).append( $button ) );
 46+ }
 47+
 48+ $dialog = $( '\
 49+<div id="mw-wikilove-dialog">\
 50+<div id="mw-wikilove-select-type">\
 51+ <span class="mw-wikilove-number">1</span>\
 52+ <h3><html:msg key="wikilove-select-type"/></h3>\
 53+ <ul id="mw-wikilove-types"></ul>\
 54+</div>\
 55+<div id="mw-wikilove-get-started">\
 56+ <h2><html:msg key="wikilove-get-started-header"/></h2>\
 57+ <ol>\
 58+ <li><html:msg key="wikilove-get-started-list-1"/></li>\
 59+ <li><html:msg key="wikilove-get-started-list-2"/></li>\
 60+ <li><html:msg key="wikilove-get-started-list-3"/></li>\
 61+ </ol>\
 62+</div>\
 63+<div id="mw-wikilove-add-details">\
 64+ <span class="mw-wikilove-number">2</span>\
 65+ <h3><html:msg key="wikilove-add-details"/></h3>\
 66+ <form id="mw-wikilove-preview-form">\
 67+ <label for="mw-wikilove-subtype" id="mw-wikilove-subtype-label"></label>\
 68+ <select id="mw-wikilove-subtype"></select>\
 69+ <div id="mw-wikilove-subtype-description"></div>\
 70+ <label id="mw-wikilove-gallery-label"><html:msg key="wikilove-image"/></label>\
 71+ <div id="mw-wikilove-gallery">\
 72+ <div id="mw-wikilove-gallery-error">\
 73+ <html:msg key="wikilove-err-gallery"/>\
 74+ <a href="#" id="mw-wikilove-gallery-error-again"><html:msg key="wikilove-err-gallery-again"/></a>\
 75+ </div>\
 76+ <div id="mw-wikilove-gallery-spinner" class="mw-wikilove-spinner"></div>\
 77+ <div id="mw-wikilove-gallery-content"></div>\
 78+ </div>\
 79+ <label for="mw-wikilove-header" id="mw-wikilove-header-label"><html:msg key="wikilove-header"/></label>\
 80+ <input type="text" class="text" id="mw-wikilove-header"/>\
 81+ <label for="mw-wikilove-title" id="mw-wikilove-title-label"><html:msg key="wikilove-title"/></label>\
 82+ <input type="text" class="text" id="mw-wikilove-title"/>\
 83+ <label for="mw-wikilove-image" id="mw-wikilove-image-label"><html:msg key="wikilove-image"/></label>\
 84+ <input type="text" class="text" id="mw-wikilove-image"/>\
 85+ <label for="mw-wikilove-message" id="mw-wikilove-message-label"><html:msg key="wikilove-enter-message"/></label>\
 86+ <span class="mw-wikilove-note"><html:msg key="wikilove-omit-sig"/></span>\
 87+ <textarea id="mw-wikilove-message"></textarea>\
 88+ <div id="mw-wikilove-notify">\
 89+ <input type="checkbox" id="mw-wikilove-notify-checkbox" name="notify"/>\
 90+ <label for="mw-wikilove-notify-checkbox"><html:msg key="wikilove-notify"/></label>\
 91+ </div>\
 92+ <button class="submit" id="mw-wikilove-button-preview" type="submit"></button>\
 93+ <div id="mw-wikilove-preview-spinner" class="mw-wikilove-spinner"></div>\
 94+ </form>\
 95+</div>\
 96+<div id="mw-wikilove-preview">\
 97+ <span class="mw-wikilove-number">3</span>\
 98+ <h3><html:msg key="wikilove-preview"/></h3>\
 99+ <div id="mw-wikilove-preview-area"></div>\
 100+ <form id="mw-wikilove-send-form">\
 101+ <button class="submit" id="mw-wikilove-button-send" type="submit"></button>\
 102+ <div id="mw-wikilove-send-spinner" class="mw-wikilove-spinner"></div>\
 103+ </form>\
 104+</div>\
 105+</div>' );
 106+ $dialog.localize();
 107+
 108+ $dialog.dialog({
 109+ width: 800,
 110+ position: ['center', 80],
 111+ autoOpen: false,
 112+ title: mw.msg( 'wikilove-dialog-title' ),
 113+ modal: true,
 114+ resizable: false
 115+ });
 116+
 117+ $( '#mw-wikilove-button-preview' ).button( { label: mw.msg( 'wikilove-button-preview' ), icons: { primary:'ui-icon-search' } } );
 118+ $( '#mw-wikilove-button-send' ).button( { label: mw.msg( 'wikilove-button-send' ) } );
 119+ $( '#mw-wikilove-add-details' ).hide();
 120+ $( '#mw-wikilove-preview' ).hide();
 121+ $( '#mw-wikilove-types' ).replaceWith( $typeList );
 122+ $( '#mw-wikilove-gallery-error-again' ).click( $.wikiLove.showGallery );
 123+ $( '#mw-wikilove-types a' ).click( $.wikiLove.clickType );
 124+ $( '#mw-wikilove-subtype' ).change( $.wikiLove.changeSubtype );
 125+ $( '#mw-wikilove-preview-form' ).submit( $.wikiLove.submitPreview );
 126+ $( '#mw-wikilove-send-form' ).click( $.wikiLove.submitSend );
 127+ $( '#mw-wikilove-message' ).elastic(); // have the message textarea grow automatically
 128+ }
 129+
 130+ $dialog.dialog( 'open' );
 131+ },
 132+
 133+ /*
 134+ * Handler for the left menu. Selects a new type and initialises next section
 135+ * depending on whether or not to show subtypes.
 136+ */
 137+ clickType: function( e ) {
 138+ e.preventDefault();
 139+ $( '#mw-wikilove-get-started' ).hide(); // always hide the get started section
 140+
 141+ var newTypeId = $( this ).data( 'typeId' );
 142+ if( currentTypeId != newTypeId ) { // only do stuff when a different type is selected
 143+ currentTypeId = newTypeId;
 144+ currentSubtypeId = null; // reset the subtype id
 145+
 146+ $( '#mw-wikilove-types' ).find( 'a' ).removeClass( 'selected' );
 147+ $( this ).addClass( 'selected' ); // highlight the new type in the menu
 148+
 149+ if( typeof options.types[currentTypeId].subtypes == 'object' ) {
 150+ // we're dealing with subtypes here
 151+ currentTypeOrSubtype = null; // reset the (sub)type object until a subtype is selected
 152+ $( '#mw-wikilove-subtype' ).html( '' ); // clear the subtype menu
 153+
 154+ for( var subtypeId in options.types[currentTypeId].subtypes ) {
 155+ // add all the subtypes to the menu while setting their subtype ids in jQuery data
 156+ var subtype = options.types[currentTypeId].subtypes[subtypeId];
 157+ if ( typeof subtype.option != 'undefined' ) {
 158+ $( '#mw-wikilove-subtype' ).append(
 159+ $( '<option></option>' ).text( subtype.option ).data( 'subtypeId', subtypeId )
 160+ );
 161+ }
 162+ }
 163+ $( '#mw-wikilove-subtype' ).show();
 164+
 165+ // change and show the subtype label depending on the type
 166+ $( '#mw-wikilove-subtype-label' ).text( options.types[currentTypeId].select || mw.msg( 'wikilove-select-type' ) );
 167+ $( '#mw-wikilove-subtype-label' ).show();
 168+ $.wikiLove.changeSubtype(); // update controls depending on the currently selected (i.e. first) subtype
 169+ }
 170+ else {
 171+ // there are no subtypes, just use this type for the current (sub)type
 172+ currentTypeOrSubtype = options.types[currentTypeId];
 173+ $( '#mw-wikilove-subtype' ).hide();
 174+ $( '#mw-wikilove-subtype-label' ).hide();
 175+ $.wikiLove.updateAllDetails(); // update controls depending on this type
 176+ }
 177+
 178+ $( '#mw-wikilove-add-details' ).show();
 179+ $( '#mw-wikilove-preview' ).hide();
 180+ previewData = null;
 181+ }
 182+ },
 183+
 184+ /*
 185+ * Handler for changing the subtype.
 186+ */
 187+ changeSubtype: function() {
 188+ // find out which subtype is selected
 189+ var newSubtypeId = $( '#mw-wikilove-subtype option:selected' ).first().data( 'subtypeId' );
 190+ if( currentSubtypeId != newSubtypeId ) { // only change stuff when a different subtype is selected
 191+ currentSubtypeId = newSubtypeId;
 192+ currentTypeOrSubtype = options.types[currentTypeId]
 193+ .subtypes[currentSubtypeId];
 194+ $( '#mw-wikilove-subtype-description' ).html( currentTypeOrSubtype.descr );
 195+ $.wikiLove.updateAllDetails();
 196+ $( '#mw-wikilove-preview' ).hide();
 197+ previewData = null;
 198+ }
 199+ },
 200+
 201+ /*
 202+ * Called when type or subtype changes, updates controls.
 203+ */
 204+ updateAllDetails: function() {
 205+ $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove();
 206+
 207+ // only show the description if it exists for this type or subtype
 208+ if( typeof currentTypeOrSubtype.descr == 'string' ) {
 209+ $( '#mw-wikilove-subtype-description').show();
 210+ } else {
 211+ $( '#mw-wikilove-subtype-description').hide();
 212+ }
 213+
 214+ // show or hide header label and textbox depending on whether a predefined header exists
 215+ $( '#mw-wikilove-header, #mw-wikilove-header-label' )
 216+ .toggle( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 );
 217+
 218+ // set the new text for the header textbox
 219+ $( '#mw-wikilove-header' ).val( currentTypeOrSubtype.header || '' );
 220+
 221+ // show or hide title label and textbox depending on whether a predefined title exists
 222+ $( '#mw-wikilove-title, #mw-wikilove-title-label')
 223+ .toggle( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 );
 224+
 225+ // set the new text for the title textbox
 226+ $( '#mw-wikilove-title' ).val( currentTypeOrSubtype.title || '' );
 227+
 228+ // show or hide image label and textbox depending on whether a predefined image exists
 229+ $( '#mw-wikilove-image, #mw-wikilove-image-label')
 230+ .toggle( $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 );
 231+
 232+ // set the new text for the image textbox
 233+ $( '#mw-wikilove-image' ).val( currentTypeOrSubtype.image || '' );
 234+
 235+ if( typeof currentTypeOrSubtype.gallery == 'object'
 236+ && currentTypeOrSubtype.gallery.imageList instanceof Array
 237+ ) {
 238+ $( '#mw-wikilove-gallery, #mw-wikilove-gallery-label' ).show();
 239+ $.wikiLove.showGallery(); // build gallery from array of images
 240+ }
 241+ else {
 242+ $( '#mw-wikilove-gallery, #mw-wikilove-gallery-label' ).hide();
 243+ }
 244+
 245+ if( $.inArray( 'notify', currentTypeOrSubtype.fields ) >= 0 && emailable ) {
 246+ $( '#mw-wikilove-notify' ).show();
 247+ } else {
 248+ $( '#mw-wikilove-notify' ).hide();
 249+ $( '#mw-wikilove-notify-checkbox' ).attr('checked', false);
 250+ }
 251+ },
 252+
 253+ /*
 254+ * Handler for clicking the preview button. Builds data for AJAX request.
 255+ */
 256+ submitPreview: function( e ) {
 257+ e.preventDefault();
 258+ $( '#mw-wikilove-preview' ).hide();
 259+ $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove();
 260+
 261+
 262+ if ( $( '#mw-wikilove-image' ).val().length <= 0 ) {
 263+ if( typeof currentTypeOrSubtype.gallery == 'object' ) {
 264+ $.wikiLove.showError( 'wikilove-err-image' ); return false;
 265+ }
 266+ else {
 267+ $( '#mw-wikilove-image' ).val( options.defaultImage );
 268+ }
 269+ }
 270+ if( $( '#mw-wikilove-header' ).val().length <= 0 ) {
 271+ $.wikiLove.showError( 'wikilove-err-header' ); return false;
 272+ }
 273+
 274+ /*
 275+ Let's not show an error for not entering a message, making it always optional.
 276+ This is preferred over removing the field from the interface, so that users are
 277+ stimulated to enter a message, but are not required to do so if they want to leave
 278+ a quick gesture of appreciation.
 279+ if( $( '#mw-wikilove-message' ).val().length <= 0 ) {
 280+ $.wikiLove.showError( 'wikilove-err-msg' ); return false;
 281+ }
 282+ */
 283+
 284+ // If there isn't a signature already in the message, throw an error
 285+ if ( $( '#mw-wikilove-message' ).val().indexOf( '~~~' ) >= 0 ) {
 286+ $.wikiLove.showError( 'wikilove-err-sig' ); return false;
 287+ }
 288+
 289+ var text = $.wikiLove.prepareMsg( currentTypeOrSubtype.text || options.defaultText );
 290+
 291+ $.wikiLove.doPreview( '==' + $( '#mw-wikilove-header' ).val() + "==\n" + text );
 292+ previewData = {
 293+ 'header': $( '#mw-wikilove-header' ).val(),
 294+ 'text': text,
 295+ 'message': $( '#mw-wikilove-message' ).val(),
 296+ 'type': currentTypeId
 297+ + (currentSubtypeId !== null ? '-' + currentSubtypeId : '')
 298+ };
 299+
 300+ if ( $( '#mw-wikilove-notify-checkbox:checked' ).val() && emailable ) {
 301+ previewData.email = $.wikiLove.prepareMsg( currentTypeOrSubtype.email );
 302+ }
 303+ },
 304+
 305+ showError: function( errmsg ) {
 306+ $( '#mw-wikilove-add-details' ).append( $( '<div class="mw-wikilove-error"></div>' ).text( mw.msg( errmsg ) ) );
 307+ },
 308+
 309+ /*
 310+ * Prepares a message or e-mail body by replacing placeholders.
 311+ * $1: message entered by the user
 312+ * $2: title of the item
 313+ * $3: title of the image
 314+ * $4: image size
 315+ * $5: background color
 316+ * $6: border color
 317+ * $7: username of the recipient
 318+ */
 319+ prepareMsg: function( msg ) {
 320+
 321+ msg = msg.replace( '$1', $( '#mw-wikilove-message' ).val() ); // replace the raw message
 322+ msg = msg.replace( '$2', $( '#mw-wikilove-title' ).val() ); // replace the title
 323+ msg = msg.replace( '$3', $( '#mw-wikilove-image' ).val() ); // replace the image
 324+ msg = msg.replace( '$4', currentTypeOrSubtype.imageSize || options.defaultImageSize ); // replace the image size
 325+ msg = msg.replace( '$5', currentTypeOrSubtype.backgroundColor || options.defaultBackgroundColor ); // replace the background color
 326+ msg = msg.replace( '$6', currentTypeOrSubtype.borderColor || options.defaultBorderColor ); // replace the border color
 327+ msg = msg.replace( '$7', mw.config.get( 'wikilove-recipient' ) ); // replace the username we're sending to
 328+
 329+ return msg;
 330+ },
 331+
 332+ /*
 333+ * Fires AJAX request for previewing wikitext.
 334+ */
 335+ doPreview: function( wikitext ) {
 336+ $( '#mw-wikilove-preview-spinner' ).fadeIn( 200 );
 337+ $.ajax({
 338+ url: mw.util.wikiScript( 'api' ),
 339+ data: {
 340+ 'action': 'parse',
 341+ 'format': 'json',
 342+ 'text': wikitext,
 343+ 'prop': 'text',
 344+ 'pst': true
 345+ },
 346+ dataType: 'json',
 347+ type: 'POST',
 348+ success: function( data ) {
 349+ $.wikiLove.showPreview( data.parse.text['*'] );
 350+ $( '#mw-wikilove-preview-spinner' ).fadeOut( 200 );
 351+ }
 352+ });
 353+ },
 354+
 355+ /*
 356+ * Callback for the preview function. Sets the preview area with the HTML and fades it in.
 357+ */
 358+ showPreview: function( html ) {
 359+ $( '#mw-wikilove-preview-area' ).html( html );
 360+ $( '#mw-wikilove-preview' ).fadeIn( 200 );
 361+ },
 362+
 363+ /*
 364+ * Handler for the send (final submit) button. Builds data for AJAX request.
 365+ * The type sent for statistics is 'typeId-subtypeId' when using subtypes,
 366+ * or simply 'typeId' otherwise.
 367+ */
 368+ submitSend: function( e ) {
 369+ e.preventDefault();
 370+ $.wikiLove.doSend( previewData.header, previewData.text,
 371+ previewData.message, previewData.type, previewData.email );
 372+ },
 373+
 374+ /*
 375+ * Fires the final AJAX request and then redirects to the talk page where the content is added.
 376+ */
 377+ doSend: function( subject, wikitext, message, type, email ) {
 378+ $( '#mw-wikilove-send-spinner' ).fadeIn( 200 );
 379+
 380+ var sendData = {
 381+ 'action': 'wikilove',
 382+ 'format': 'json',
 383+ 'title': mw.config.get( 'wgPageName' ),
 384+ 'type': type,
 385+ 'text': wikitext,
 386+ 'message': message,
 387+ 'subject': subject,
 388+ 'token': mw.user.tokens.get( 'editToken' )
 389+ };
 390+
 391+ if ( email ) {
 392+ sendData.email = email;
 393+ }
 394+
 395+ $.ajax({
 396+ url: mw.util.wikiScript( 'api' ),
 397+ data: sendData,
 398+ dataType: 'json',
 399+ type: 'POST',
 400+ success: function( data ) {
 401+ $( '#mw-wikilove-send-spinner' ).fadeOut( 200 );
 402+
 403+ if ( typeof data.error !== 'undefined' ) {
 404+ $( '#mw-wikilove-preview' ).append( '<div class="mw-wikilove-error">' + mw.html.escape( data.error.info ) + '<div>' );
 405+ return;
 406+ }
 407+
 408+ if ( typeof data.redirect !== 'undefined'
 409+ && data.redirect.pageName == mw.config.get( 'wgPageName' ) ) {
 410+ // unfortunately, when on the talk page we cannot reload and then
 411+ // jump to the correct section, because when we set the hash (#...)
 412+ // the page won't reload...
 413+ window.location.reload();
 414+ }
 415+ else {
 416+ window.location = mw.util.wikiUrlencode(
 417+ mw.config.get( 'wgArticlePath' ).replace( '$1', data.redirect.pageName )
 418+ + '#' + data.redirect.fragment );
 419+ }
 420+ }
 421+ });
 422+ },
 423+
 424+ /*
 425+ * This function is called if the gallery is an array of images. It retrieves the image
 426+ * thumbnails from the API, and constructs a thumbnail gallery with them.
 427+ */
 428+ showGallery: function() {
 429+ $( '#mw-wikilove-gallery-content' ).html( '' );
 430+ gallery = {};
 431+ $( '#mw-wikilove-gallery-spinner' ).fadeIn( 200 );
 432+ $( '#mw-wikilove-gallery-error' ).hide();
 433+
 434+ if( typeof currentTypeOrSubtype.gallery.number == 'undefined'
 435+ || currentTypeOrSubtype.gallery.number <= 0
 436+ ) {
 437+ currentTypeOrSubtype.gallery.number = currentTypeOrSubtype.gallery.imageList.length;
 438+ }
 439+
 440+ var titles = '';
 441+ var imageList = currentTypeOrSubtype.gallery.imageList.slice( 0 );
 442+ for( var i=0; i<currentTypeOrSubtype.gallery.number; i++ ) {
 443+ // get a randomimage
 444+ var id = Math.floor( Math.random() * imageList.length );
 445+ titles = titles + 'File:' + imageList[id] + '|';
 446+
 447+ // remove the random page from the keys array
 448+ imageList.splice(id, 1);
 449+ }
 450+
 451+ var index = 0,
 452+ loadingType = currentTypeOrSubtype,
 453+ loadingIndex = 0;
 454+ $.ajax({
 455+ url: mw.util.wikiScript( 'api' ),
 456+ data: {
 457+ 'action' : 'query',
 458+ 'format' : 'json',
 459+ 'prop' : 'imageinfo',
 460+ 'iiprop' : 'mime|url',
 461+ 'titles' : titles,
 462+ 'iiurlwidth' : currentTypeOrSubtype.gallery.width
 463+ },
 464+ dataType: 'json',
 465+ type: 'POST',
 466+ success: function( data ) {
 467+ if ( !data || !data.query || !data.query.pages ) {
 468+ $( '#mw-wikilove-gallery-error' ).show();
 469+ $( '#mw-wikilove-gallery-spinner' ).fadeOut( 200 );
 470+ return;
 471+ }
 472+
 473+ if ( loadingType != currentTypeOrSubtype ) {
 474+ return;
 475+ }
 476+
 477+ $.each( data.query.pages, function( id, page ) {
 478+ if ( page.imageinfo && page.imageinfo.length ) {
 479+ // build an image tag with the correct url and width
 480+ var $img = $( '<img/>' )
 481+ .attr( 'src', page.imageinfo[0].thumburl )
 482+ .attr( 'width', currentTypeOrSubtype.gallery.width )
 483+ .hide()
 484+ .load( function() {
 485+ $( this ).css( 'display', 'inline-block' );
 486+ loadingIndex++;
 487+ if ( loadingIndex >= currentTypeOrSubtype.gallery.number ) {
 488+ $( '#mw-wikilove-gallery-spinner' ).fadeOut( 200 );
 489+ }
 490+ } );
 491+ $( '#mw-wikilove-gallery-content' ).append(
 492+ $( '<a href="#"></a>' )
 493+ .attr( 'id', 'mw-wikilove-gallery-img-' + index )
 494+ .append( $img )
 495+ .click( function( e ) {
 496+ e.preventDefault();
 497+ $( '#mw-wikilove-gallery a' ).removeClass( 'selected' );
 498+ $( this ).addClass( 'selected' );
 499+ $( '#mw-wikilove-image' ).val( gallery[$( this ).attr( 'id' )] );
 500+ })
 501+ );
 502+ gallery['mw-wikilove-gallery-img-' + index] = page.title;
 503+ index++;
 504+ }
 505+ } );
 506+ },
 507+ error: function() {
 508+ $( '#mw-wikilove-gallery-error' ).show();
 509+ $( '#mw-wikilove-gallery-spinner' ).fadeOut( 200 );
 510+ }
 511+ });
 512+ },
 513+
 514+ /*
 515+ * Init function which is called upon page load. Binds the WikiLove icon to opening the dialog.
 516+ */
 517+ init: function() {
 518+ options = $.wikiLove.optionsHook();
 519+ $( '#ca-wikilove' ).find( 'a' ).click( function( e ) {
 520+ $.wikiLove.openDialog();
 521+ e.preventDefault();
 522+ });
 523+ }
 524+
 525+ /*
 526+ * This is a bit of a hack to show some random images. A predefined set of image infos are
 527+ * retrieved using the API. Then we randomise this set ourselves and select some images to
 528+ * show. Eventually we probably want to make a custom API call that does this properly and
 529+ * also allows for using remote galleries such as Commons, which is now prohibited by JS.
 530+ *
 531+ * For now this function is disabled. It also shares code with the current gallery function,
 532+ * so when enabling it again it should be implemented cleaner with a custom API call, and
 533+ * without duplicate code between functions
 534+ */
 535+ /*
 536+ makeGallery: function() {
 537+ $( '#mw-wikilove-gallery-content' ).html( '' );
 538+ gallery = {};
 539+ $( '#mw-wikilove-gallery-spinner' ).fadeIn( 200 );
 540+
 541+ $.ajax({
 542+ url: mw.util.wikiScript( 'api' ),
 543+ data: {
 544+ 'action' : 'query',
 545+ 'format' : 'json',
 546+ 'prop' : 'imageinfo',
 547+ 'iiprop' : 'mime|url',
 548+ 'iiurlwidth' : currentTypeOrSubtype.gallery.width,
 549+ 'generator' : 'categorymembers',
 550+ 'gcmtitle' : currentTypeOrSubtype.gallery.category,
 551+ 'gcmnamespace': 6,
 552+ 'gcmsort' : 'timestamp',
 553+ 'gcmlimit' : currentTypeOrSubtype.gallery.total
 554+ },
 555+ dataType: 'json',
 556+ type: 'POST',
 557+ success: function( data ) {
 558+ // clear
 559+ $( '#mw-wikilove-gallery-content' ).html( '' );
 560+ gallery = {};
 561+
 562+ // if we have any images at all
 563+ if( data.query) {
 564+ // get the page keys which are just ids
 565+ var keys = Object.keys( data.query.pages );
 566+
 567+ // try to find "num" images to show
 568+ for( var i=0; i<currentTypeOrSubtype.gallery.num; i++ ) {
 569+ // continue looking for a new image until we have found one thats valid
 570+ // or until we run out of images
 571+ while( keys.length > 0 ) {
 572+ // get a random page
 573+ var id = Math.floor( Math.random() * keys.length );
 574+ var page = data.query.pages[keys[id]];
 575+
 576+ // remove the random page from the keys array
 577+ keys.splice(id, 1);
 578+
 579+ // only add the image if it's actually an image
 580+ if( page.imageinfo[0].mime.substr(0,5) == 'image' ) {
 581+ // build an image tag with the correct url and width
 582+ var $img = $( '<img/>' )
 583+ .attr( 'src', page.imageinfo[0].url )
 584+ .attr( 'width', currentTypeOrSubtype.gallery.width )
 585+ .hide()
 586+ .load( function() { $( this ).css( 'display', 'inline-block' ); } );
 587+
 588+ // append the image to the gallery and also make sure it's selectable
 589+ $( '#mw-wikilove-gallery-content' ).append(
 590+ $( '<a href="#"></a>' )
 591+ .attr( 'id', 'mw-wikilove-gallery-img-' + i )
 592+ .append( $img )
 593+ .click( function( e ) {
 594+ e.preventDefault();
 595+ $( '#mw-wikilove-gallery a' ).removeClass( 'selected' );
 596+ $( this ).addClass( 'selected' );
 597+ $( '#mw-wikilove-image' ).val( gallery[$( this ).attr( 'id' )] );
 598+ })
 599+ );
 600+
 601+ // save the page title into an array so we know which image id maps to which title
 602+ gallery['mw-wikilove-gallery-img-' + i] = page.title;
 603+ break;
 604+ }
 605+ }
 606+ }
 607+ }
 608+ if( gallery.length <= 0 ) {
 609+ $( '#mw-wikilove-gallery' ).hide();
 610+ $( '#mw-wikilove-gallery-label' ).hide();
 611+ }
 612+
 613+ $( '#mw-wikilove-gallery-spinner' ).fadeOut( 200 );
 614+ }
 615+ });
 616+ },
 617+ */
 618+};
 619+
 620+}());
 621+} ) ( jQuery );
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
___________________________________________________________________
Added: svn:eol-style
1622 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/README
@@ -0,0 +1,5 @@
 2+WikiLove is an extension designed to promote the spread of WikiLove,
 3+message of positive reinforcement that users can send to each other.
 4+
 5+See documentation at the MediaWiki wiki:
 6+ http://www.mediawiki.org/wiki/Extension:WikiLove
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/README
___________________________________________________________________
Added: svn:eol-style
17 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.i18n.php
@@ -0,0 +1,490 @@
 2+<?php
 3+/**
 4+ * Internationalisation for WikiLove extension
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+$messages = array();
 11+
 12+/** English
 13+ * @author Ryan Kaldari, Jan Paul Posma
 14+ */
 15+$messages['en'] = array(
 16+ 'wikilove-desc' => 'Adds an interface for facilitating positive user feedback to user talk pages',
 17+ 'wikilove' => 'WikiLove',
 18+ 'wikilove-enable-preference' => 'Enable showing appreciation for other users with the WikiLove tab (experimental)',
 19+ 'wikilove-tab-text' => 'Show appreciation',
 20+ 'tooltip-ca-wikilove' => 'Post a message for this user showing your appreciation',
 21+ 'wikilove-dialog-title' => 'WikiLove',
 22+ 'wikilove-select-type' => 'Select type',
 23+ 'wikilove-get-started-header' => "Let's get started!",
 24+ 'wikilove-get-started-list-1' => 'Select the type of WikiLove you wish to send',
 25+ 'wikilove-get-started-list-2' => 'Add details to your WikiLove',
 26+ 'wikilove-get-started-list-3' => 'Send your WikiLove!',
 27+ 'wikilove-add-details' => 'Add details',
 28+ 'wikilove-image' => 'Image:',
 29+ 'wikilove-header' => 'Header:',
 30+ 'wikilove-title' => 'Title:',
 31+ 'wikilove-enter-message' => 'Enter a message:',
 32+ 'wikilove-omit-sig' => '(without a signature)',
 33+ 'wikilove-button-preview' => 'Preview',
 34+ 'wikilove-preview' => 'Preview',
 35+ 'wikilove-notify' => 'Notify the user by e-mail',
 36+ 'wikilove-button-send' => 'Send WikiLove',
 37+ 'wikilove-type-makeyourown' => 'Make your own',
 38+ 'wikilove-err-header' => 'Please enter a header.',
 39+ 'wikilove-err-title' => 'Please enter a title.',
 40+ 'wikilove-err-msg' => 'Please enter a message.',
 41+ 'wikilove-err-image' => 'Please select an image.',
 42+ 'wikilove-err-sig' => 'Please do not include a signature in the message.',
 43+ 'wikilove-err-gallery' => 'Something went wrong when loading the images!',
 44+ 'wikilove-err-gallery-again' => 'Try again',
 45+ 'wikilove-summary' => '/* $1 */ new WikiLove message'
 46+);
 47+
 48+/** Message documentation (Message documentation)
 49+ * @author McDutchie
 50+ */
 51+$messages['qqq'] = array(
 52+ 'wikilove-button-preview' => 'Button text. Verb.',
 53+ 'wikilove-preview' => 'Title. Noun.',
 54+ 'wikilove-barnstar-header' => 'See [[:wikipedia:Barnstar]]. Probably not literally translatable.',
 55+);
 56+
 57+/** Bulgarian (Български)
 58+ * @author DCLXVI
 59+ */
 60+$messages['bg'] = array(
 61+ 'wikilove' => 'УикиОбич',
 62+ 'wikilove-dialog-title' => 'УикиОбич',
 63+ 'wikilove-omit-sig' => '(без подпис)',
 64+ 'wikilove-button-preview' => 'Предварителен преглед',
 65+ 'wikilove-preview' => 'Предварителен преглед',
 66+ 'wikilove-button-send' => 'Изпращане на УикиОбич',
 67+ 'wikilove-err-gallery-again' => 'Опитайте отново',
 68+);
 69+
 70+/** German (Deutsch)
 71+ * @author Kghbln
 72+ */
 73+$messages['de'] = array(
 74+ 'wikilove-desc' => 'Ergänzt ein Hilfsmittel zum Ausdrücken persönlicher Wertschätzung gegenüber einem Benutzer auf dessen Diskussionsseite',
 75+ 'wikilove' => 'Wikiliebe',
 76+ 'wikilove-enable-preference' => 'Menüreiter für das Hilfsmittel zum Ausdrücken persönlicher Wertschätzung gegenüber einem anderen Benutzer aktivieren (experimentell)',
 77+ 'wikilove-tab-text' => 'Wertschätzen',
 78+ 'tooltip-ca-wikilove' => 'Diesem Benutzer die persönliche Wertschätzung in Form einer Nachricht hinterlassen',
 79+ 'wikilove-dialog-title' => 'Persönliche Wertschätzung',
 80+ 'wikilove-select-type' => 'Art auswählen',
 81+ 'wikilove-get-started-header' => 'Los geht’s!',
 82+ 'wikilove-get-started-list-1' => 'Die Art der persönlichen Wertschätzung auswählen, die ausgedrückt werden soll',
 83+ 'wikilove-get-started-list-2' => 'Persönliche Wertschätzung ergänzen',
 84+ 'wikilove-get-started-list-3' => 'Persönliche Wertschätzung senden',
 85+ 'wikilove-add-details' => 'Ergänzungen hinzufügen',
 86+ 'wikilove-image' => 'Bild:',
 87+ 'wikilove-header' => 'Kopfbereich:',
 88+ 'wikilove-title' => 'Titel:',
 89+ 'wikilove-enter-message' => 'Eine Nachricht erfassen:',
 90+ 'wikilove-omit-sig' => '(ohne Signatur)',
 91+ 'wikilove-button-preview' => 'Vorschau',
 92+ 'wikilove-preview' => 'Vorschau',
 93+ 'wikilove-notify' => 'Den Benutzer per E-Mail benachrichtigen',
 94+ 'wikilove-button-send' => 'Persönliche Wertschätzung senden',
 95+ 'wikilove-type-makeyourown' => 'Eigene Art der Wertschätzung erstellen',
 96+ 'wikilove-err-header' => 'Bitte einen Kopfbereich eingeben.',
 97+ 'wikilove-err-title' => 'Bitte einen Titel eingeben.',
 98+ 'wikilove-err-msg' => 'Bitte eine Nachricht eingeben.',
 99+ 'wikilove-err-image' => 'Bitte ein Bild auswählen.',
 100+ 'wikilove-err-sig' => 'Bitte keine Signatur im Nachrichtentext eingeben.',
 101+ 'wikilove-err-gallery' => 'Etwas ist beim Laden der Bilder schief gelaufen.',
 102+ 'wikilove-err-gallery-again' => 'Bitte erneut versuchen',
 103+ 'wikilove-summary' => '/* $1 */ neue persönliche Wertschätzung',
 104+);
 105+
 106+/** French (Français)
 107+ * @author Crochet.david
 108+ * @author IAlex
 109+ * @author Jean-Frédéric
 110+ * @author Sherbrooke
 111+ */
 112+$messages['fr'] = array(
 113+ 'wikilove-desc' => "Ajoute une interface pour faciliter la rétroaction positive sur la page de discussion d'un utilisateur",
 114+ 'wikilove' => 'WikiLove',
 115+ 'wikilove-enable-preference' => "Active l'onglet WikiLove servant à signifier aux autres contributeurs votre appréciation (expérimental)",
 116+ 'wikilove-tab-text' => 'Montrer votre appréciation',
 117+ 'tooltip-ca-wikilove' => 'Poster un message à cet utilisateur pour indiquer votre appréciation',
 118+ 'wikilove-dialog-title' => 'WikiLove',
 119+ 'wikilove-select-type' => 'Sélectionnez le type',
 120+ 'wikilove-get-started-header' => 'Commençons !',
 121+ 'wikilove-get-started-list-1' => 'Sélectionnez le type de WikiLove que vous souhaitez envoyer',
 122+ 'wikilove-get-started-list-2' => 'Ajoutez des détails à votre WikiLove',
 123+ 'wikilove-get-started-list-3' => 'Envoyez votre WikiLove !',
 124+ 'wikilove-add-details' => 'Ajouter des détails',
 125+ 'wikilove-image' => 'Image :',
 126+ 'wikilove-header' => 'En-tête :',
 127+ 'wikilove-title' => 'Titre :',
 128+ 'wikilove-enter-message' => 'Entrez un message :',
 129+ 'wikilove-omit-sig' => '(sans signature)',
 130+ 'wikilove-button-preview' => 'Prévisualiser',
 131+ 'wikilove-preview' => 'Prévisualiser',
 132+ 'wikilove-notify' => 'Notifier l’utilisateur par courriel',
 133+ 'wikilove-button-send' => 'Envoyer le WikiLove',
 134+ 'wikilove-type-makeyourown' => 'Créez votre propre',
 135+ 'wikilove-err-header' => "S'il vous plaît inscrire un en-tête.",
 136+ 'wikilove-err-title' => "S'il vous plaît inscrire un titre.",
 137+ 'wikilove-err-msg' => "S'il vous plaît inscrire un message.",
 138+ 'wikilove-err-image' => "S'il vous plaît sélectionner une image.",
 139+ 'wikilove-err-sig' => "S'il vous plaît ne pas inclure une signature dans le message.",
 140+ 'wikilove-err-gallery' => "Quelque chose n'a pas fonctionné lors du chargement des images !",
 141+ 'wikilove-err-gallery-again' => 'Essayez à nouveau',
 142+);
 143+
 144+/** Franco-Provençal (Arpetan)
 145+ * @author ChrisPtDe
 146+ */
 147+$messages['frp'] = array(
 148+ 'wikilove' => 'VouiquiAmôr',
 149+ 'wikilove-tab-text' => 'Montrar voutra aprèciacion',
 150+ 'wikilove-dialog-title' => 'VouiquiAmôr',
 151+ 'wikilove-select-type' => 'Chouèsésséd lo tipo',
 152+ 'wikilove-get-started-header' => 'Comencens !',
 153+ 'wikilove-get-started-list-1' => 'Chouèsésséd lo tipo de VouiquiAmôr que vos souhètâd mandar',
 154+ 'wikilove-get-started-list-2' => 'Apondéd des dètalys a voutron VouiquiAmôr',
 155+ 'wikilove-get-started-list-3' => 'Mandâd voutron VouiquiAmôr !',
 156+ 'wikilove-add-details' => 'Apondre des dètalys',
 157+ 'wikilove-image' => 'Émâge :',
 158+ 'wikilove-header' => 'En-téta :',
 159+ 'wikilove-title' => 'Titro :',
 160+ 'wikilove-enter-message' => 'Buchiéd un mèssâjo :',
 161+ 'wikilove-omit-sig' => '(sen signatura)',
 162+ 'wikilove-button-preview' => 'Prèvisualisar',
 163+ 'wikilove-preview' => 'Prèvisualisacion',
 164+ 'wikilove-notify' => 'Notifiar l’utilisator per mèssageria èlèctronica',
 165+ 'wikilove-button-send' => 'Mandar lo VouiquiAmôr',
 166+ 'wikilove-type-makeyourown' => 'Féte voutron prôpro',
 167+ 'wikilove-err-header' => 'Volyéd buchiér un en-téta.',
 168+ 'wikilove-err-title' => 'Volyéd buchiér un titro.',
 169+ 'wikilove-err-msg' => 'Volyéd buchiér un mèssâjo.',
 170+ 'wikilove-err-image' => 'Volyéd chouèsir una émâge.',
 171+ 'wikilove-err-sig' => 'Volyéd pas encllure una signatura dens lo mèssâjo.',
 172+ 'wikilove-err-gallery-again' => 'Tornâd èprovar',
 173+);
 174+
 175+/** Galician (Galego)
 176+ * @author Toliño
 177+ */
 178+$messages['gl'] = array(
 179+ 'wikilove-desc' => 'Engade unha interface para facilitar a mostra de aprecio cara a un usuario na súa páxina de conversa',
 180+ 'wikilove' => 'Amor wiki',
 181+ 'wikilove-enable-preference' => 'Activar o envío de mostras de aprecio aos outros usuarios mediante a lapela de amor wiki (experimental)',
 182+ 'wikilove-tab-text' => 'Mostrar o aprecio',
 183+ 'tooltip-ca-wikilove' => 'Déixelle unha mensaxe a este usuario mostrando o seu aprecio',
 184+ 'wikilove-dialog-title' => 'Amor wiki',
 185+ 'wikilove-select-type' => 'Seleccione o tipo',
 186+ 'wikilove-get-started-header' => 'Comecemos!',
 187+ 'wikilove-get-started-list-1' => 'Seleccione tipo de amor wiki que queira enviar',
 188+ 'wikilove-get-started-list-2' => 'Engadir detalles ao seu amor wiki',
 189+ 'wikilove-get-started-list-3' => 'Enviar o seu amor wiki!',
 190+ 'wikilove-add-details' => 'Engadir detalles',
 191+ 'wikilove-image' => 'Imaxe:',
 192+ 'wikilove-header' => 'Cabeceira:',
 193+ 'wikilove-title' => 'Título:',
 194+ 'wikilove-enter-message' => 'Escriba unha mensaxe:',
 195+ 'wikilove-omit-sig' => '(sen sinatura)',
 196+ 'wikilove-button-preview' => 'Vista previa',
 197+ 'wikilove-preview' => 'Vista previa',
 198+ 'wikilove-notify' => 'Informar ao usuario por correo electrónico',
 199+ 'wikilove-button-send' => 'Enviar o amor wiki',
 200+ 'wikilove-type-makeyourown' => 'Faga o seu',
 201+ 'wikilove-err-header' => 'Escriba unha cabeceira.',
 202+ 'wikilove-err-title' => 'Escriba un título.',
 203+ 'wikilove-err-msg' => 'Escriba unha mensaxe.',
 204+ 'wikilove-err-image' => 'Seleccione unha imaxe.',
 205+ 'wikilove-err-sig' => 'Non incluír a sinatura na mensaxe.',
 206+ 'wikilove-err-gallery' => 'Houbo un problema ao cargar as imaxes!',
 207+ 'wikilove-err-gallery-again' => 'Inténteo de novo',
 208+ 'wikilove-summary' => '/* $1 */ nova mensaxe de amor wiki',
 209+);
 210+
 211+/** Hebrew (עברית)
 212+ * @author Amire80
 213+ */
 214+$messages['he'] = array(
 215+ 'wikilove-desc' => 'הוספת ממשק לשליחת תגובות חיוביות לדפי שיחת משתמש',
 216+ 'wikilove' => 'ויקי־אהבה',
 217+ 'wikilove-enable-preference' => 'הפעלה של הצגת הערכה למשתמשים אחרים באמצעות לשונית ויקי־אהבה (ניסיוני)',
 218+ 'wikilove-tab-text' => 'להראות הערכה',
 219+ 'tooltip-ca-wikilove' => 'לשלוח למשתמש הזה הודעה שמראה את הערכתך',
 220+ 'wikilove-dialog-title' => 'ויקי־אהבה',
 221+ 'wikilove-select-type' => 'בחירת סוג',
 222+ 'wikilove-get-started-header' => 'בואו נתחיל!',
 223+ 'wikilove-get-started-list-1' => 'איזה סוג של ויקי‏־אהבה לשלוח',
 224+ 'wikilove-get-started-list-2' => 'להוסיף פרטים להודעת ויקי־‏אהבה',
 225+ 'wikilove-get-started-list-3' => 'לשלוח ויקי־אהבה!',
 226+ 'wikilove-add-details' => 'הוספת פרטים',
 227+ 'wikilove-image' => 'תמונה:',
 228+ 'wikilove-header' => 'כותרת פסקה:',
 229+ 'wikilove-title' => 'שם הצל"ש:',
 230+ 'wikilove-enter-message' => 'הודעה:',
 231+ 'wikilove-omit-sig' => '(ללא חתימה)',
 232+ 'wikilove-button-preview' => 'תצוגה מקדימה',
 233+ 'wikilove-preview' => 'תצוגה מקדימה',
 234+ 'wikilove-notify' => 'להודיע למשתמש בדואר אלקטרוני',
 235+ 'wikilove-button-send' => 'לשלוח ויקי־אהבה',
 236+ 'wikilove-type-makeyourown' => 'יצירה אישית',
 237+ 'wikilove-err-header' => 'נא להזין כותרת פסקה.',
 238+ 'wikilove-err-title' => 'נא להזין שם לצל"ש.',
 239+ 'wikilove-err-msg' => 'נא להזין הודעה.',
 240+ 'wikilove-err-image' => 'נא לבחור תמונה.',
 241+ 'wikilove-err-sig' => 'נא לא לכתוב חתימה בהודעה.',
 242+);
 243+
 244+/** Hungarian (Magyar)
 245+ * @author Dani
 246+ */
 247+$messages['hu'] = array(
 248+ 'wikilove' => 'Wikibók',
 249+ 'wikilove-dialog-title' => 'Wikibók',
 250+ 'wikilove-select-type' => 'Válassz típust',
 251+ 'wikilove-get-started-list-1' => 'Válaszd ki a wikibók típusát',
 252+ 'wikilove-get-started-list-2' => 'Töltsd ki a részleteket',
 253+ 'wikilove-get-started-list-3' => 'Küldd el a wikibókot!',
 254+ 'wikilove-add-details' => 'Részletek',
 255+ 'wikilove-image' => 'Kép:',
 256+ 'wikilove-header' => 'Fejléc:',
 257+ 'wikilove-title' => 'Cím:',
 258+ 'wikilove-enter-message' => 'Üzenet:',
 259+ 'wikilove-omit-sig' => '(aláírás nélkül)',
 260+ 'wikilove-button-preview' => 'Előnézet',
 261+ 'wikilove-preview' => 'Előnézet',
 262+ 'wikilove-notify' => 'Felhasználó értesítése e-mailben',
 263+ 'wikilove-button-send' => 'Wikibók elküldése',
 264+ 'wikilove-type-makeyourown' => 'Egyedi készítése',
 265+ 'wikilove-err-header' => 'Add meg a fejlécet!',
 266+ 'wikilove-err-title' => 'Add meg a címet!',
 267+ 'wikilove-err-msg' => 'Add meg az üzenetet!',
 268+ 'wikilove-err-image' => 'Válassz egy képet!',
 269+ 'wikilove-err-sig' => 'Ne helyezz el aláírást az üzenetben!',
 270+ 'wikilove-err-gallery' => 'Valami hiba történt a képek betöltése közben!',
 271+ 'wikilove-err-gallery-again' => 'Újrapróbálkozás',
 272+);
 273+
 274+/** Interlingua (Interlingua)
 275+ * @author McDutchie
 276+ */
 277+$messages['ia'] = array(
 278+ 'wikilove-desc' => 'Adde un interfacie pro exprimer appreciation in le paginas de discussion de usatores',
 279+ 'wikilove' => 'WikiLove',
 280+ 'wikilove-enable-preference' => 'Permitter monstrar appreciation pro altere usatores con le scheda WikiLove (experimental)',
 281+ 'wikilove-tab-text' => 'Monstrar appreciation',
 282+ 'tooltip-ca-wikilove' => 'Publicar un message pro iste usator que monstra tu appreciation',
 283+ 'wikilove-dialog-title' => 'WikiLove',
 284+ 'wikilove-select-type' => 'Selige typo',
 285+ 'wikilove-get-started-header' => 'Nos comencia!',
 286+ 'wikilove-get-started-list-1' => 'Selige le typo de WikiLove que tu vole inviar',
 287+ 'wikilove-get-started-list-2' => 'Adde detalios a tu WikiLove',
 288+ 'wikilove-get-started-list-3' => 'Invia tu WikiLove!',
 289+ 'wikilove-add-details' => 'Adder detalios',
 290+ 'wikilove-image' => 'Imagine:',
 291+ 'wikilove-header' => 'Capite:',
 292+ 'wikilove-title' => 'Titulo:',
 293+ 'wikilove-enter-message' => 'Entra un message:',
 294+ 'wikilove-omit-sig' => '(sin signatura)',
 295+ 'wikilove-button-preview' => 'Previsualisar',
 296+ 'wikilove-preview' => 'Previsualisation',
 297+ 'wikilove-notify' => 'Notificar le usator per e-mail',
 298+ 'wikilove-button-send' => 'Inviar WikiLove',
 299+ 'wikilove-type-makeyourown' => 'Crear le tue',
 300+ 'wikilove-err-header' => 'Per favor entra un capite.',
 301+ 'wikilove-err-title' => 'Per favor entra un titulo.',
 302+ 'wikilove-err-msg' => 'Per favor entra un message.',
 303+ 'wikilove-err-image' => 'Per favor selige un imagine.',
 304+ 'wikilove-err-sig' => 'Per favor non include un signatura in le message.',
 305+ 'wikilove-err-gallery' => 'Un problema occurreva durante le cargamento del imagines!',
 306+ 'wikilove-err-gallery-again' => 'Reprobar',
 307+);
 308+
 309+/** Colognian (Ripoarisch)
 310+ * @author Purodha
 311+ */
 312+$messages['ksh'] = array(
 313+ 'wikilove-desc' => 'Määd et müjjelesch, einem sing Aanäkännong ußzeshpräsche, övver däm sing Klaafsigg em Wiki.',
 314+ 'wikilove' => 'Leev Wiki',
 315+ 'wikilove-enable-preference' => 'Määd et müjjelesch, einem sing Aanäkännong ußzeshpräsche (för zom Ußprobeere)',
 316+ 'wikilove-tab-text' => 'Donn Ding Aanerkennog ußdröcke',
 317+ 'tooltip-ca-wikilove' => 'Donn Ding Aanerkennong en ene päsöönlesche Nohreesch ußdröcke',
 318+ 'wikilove-dialog-title' => 'Aanäkännong em Wiki',
 319+ 'wikilove-select-type' => 'Donn en Zoot ußwähle',
 320+ 'wikilove-get-started-header' => 'Lom_mer ens med aanfange!',
 321+ 'wikilove-get-started-list-1' => 'Donn de Aad udder Zoot vun Dinge Aanäkännong ußwähle, di de över et Wiki schecke wells',
 322+ 'wikilove-get-started-list-2' => 'Donn Einzelheite övver Ding päsöönlesche Aanäkännong dobei',
 323+ 'wikilove-get-started-list-3' => 'Donn Ding Aanäkännong övverjävve',
 324+ 'wikilove-add-details' => 'Don noch Einzelheite dobei',
 325+ 'wikilove-title' => 'Tittel:',
 326+ 'wikilove-enter-message' => 'Jiv ene Täx en',
 327+ 'wikilove-omit-sig' => '(der ohne en Ongerschreff)',
 328+ 'wikilove-button-preview' => 'Vör-Aansesch',
 329+ 'wikilove-preview' => 'Vör-Aansesch',
 330+ 'wikilove-button-send' => 'Donn e joot Jeföhl schecke',
 331+ 'wikilove-type-makeyourown' => 'Maach Ding eije',
 332+);
 333+
 334+/** Luxembourgish (Lëtzebuergesch)
 335+ * @author Robby
 336+ */
 337+$messages['lb'] = array(
 338+ 'wikilove' => 'WikiLove',
 339+ 'wikilove-tab-text' => 'Bewäertung weisen',
 340+ 'wikilove-dialog-title' => 'WikiLove',
 341+ 'wikilove-get-started-header' => 'Elo geet et lass!',
 342+ 'wikilove-add-details' => 'Detailer derbäisetzen',
 343+ 'wikilove-image' => 'Bild:',
 344+ 'wikilove-title' => 'Titel:',
 345+ 'wikilove-button-preview' => 'Kucken ouni ofzespäicheren',
 346+ 'wikilove-preview' => 'Kucken ouni ofzespäicheren',
 347+ 'wikilove-err-image' => 'Sicht w.e.g. e Bild eraus.',
 348+ 'wikilove-barnstar-header' => 'Een Uerde fir Iech!',
 349+);
 350+
 351+/** Macedonian (Македонски)
 352+ * @author Bjankuloski06
 353+ */
 354+$messages['mk'] = array(
 355+ 'wikilove-desc' => 'Додава посредник за искажување на позитивни мислења и поддршка на кориснички страници за разговор',
 356+ 'wikilove' => 'ВикиЉубов',
 357+ 'wikilove-enable-preference' => 'Овозможи оддавање на признанија и заслуги со јазичето ВикиЉубов (експериментално)',
 358+ 'wikilove-tab-text' => 'Оддај признание',
 359+ 'tooltip-ca-wikilove' => 'Оставете му порака на корисников кажувајќи му дека го цените',
 360+ 'wikilove-dialog-title' => 'ВикиЉубов',
 361+ 'wikilove-select-type' => 'Одберете тип',
 362+ 'wikilove-get-started-header' => 'Да почнеме!',
 363+ 'wikilove-get-started-list-1' => 'Одберете го типот на ВикиЉубов што сакате да ја испратите',
 364+ 'wikilove-get-started-list-2' => 'Внесете содржина на ВикиЉубов-та',
 365+ 'wikilove-get-started-list-3' => 'Испратете ја вашата ВикиЉубов',
 366+ 'wikilove-add-details' => 'Внесете содржина',
 367+ 'wikilove-image' => 'Слика:',
 368+ 'wikilove-header' => 'Заглавие:',
 369+ 'wikilove-title' => 'Наслов:',
 370+ 'wikilove-enter-message' => 'Внесете порака:',
 371+ 'wikilove-omit-sig' => '(без потпис)',
 372+ 'wikilove-button-preview' => 'Преглед',
 373+ 'wikilove-preview' => 'Преглед',
 374+ 'wikilove-notify' => 'Извести го корисникот по е-пошта',
 375+ 'wikilove-button-send' => 'Испрати ВикиЉубов',
 376+ 'wikilove-type-makeyourown' => 'Направете своја',
 377+ 'wikilove-err-header' => 'Внесете заглавие.',
 378+ 'wikilove-err-title' => 'Внесете наслов.',
 379+ 'wikilove-err-msg' => 'Внесете порака.',
 380+ 'wikilove-err-image' => 'Одберете слика.',
 381+ 'wikilove-err-sig' => 'Не ставајте потпис во пораката.',
 382+ 'wikilove-err-gallery' => 'Се појави грешка при вчитувањето на сликите!',
 383+ 'wikilove-err-gallery-again' => 'Обиди се повторно',
 384+ 'wikilove-summary' => '/* $1 */ нова порака (ВикиЉубов)',
 385+);
 386+
 387+/** Dutch (Nederlands)
 388+ * @author SPQRobin
 389+ * @author Siebrand
 390+ */
 391+$messages['nl'] = array(
 392+ 'wikilove-desc' => "Voegt een interface toe voor het geven van positieve terugkoppeling op overlegpagina's van gebruikers",
 393+ 'wikilove' => 'Wikiwaardering',
 394+ 'wikilove-enable-preference' => 'Waardering geven aan andere gebruikers via Wikiwaardering inschakelen (experimenteel)',
 395+ 'wikilove-tab-text' => 'Waardering tonen',
 396+ 'tooltip-ca-wikilove' => 'Plaats een bericht voor deze gebruiker om uw waardering te tonen',
 397+ 'wikilove-dialog-title' => 'Wikiwaardering',
 398+ 'wikilove-select-type' => 'Selecteer type',
 399+ 'wikilove-get-started-header' => 'Begin ermee!',
 400+ 'wikilove-get-started-list-1' => 'Selecteer het type Wikiwaardering dat u wilt achterlaten',
 401+ 'wikilove-get-started-list-2' => 'Voegt gegevens toe aan uw Wikiwaardering',
 402+ 'wikilove-get-started-list-3' => 'Uw Wikiwaardering verzenden!',
 403+ 'wikilove-add-details' => 'Gegevens toevoegen',
 404+ 'wikilove-image' => 'Afbeelding:',
 405+ 'wikilove-header' => 'Koptekst:',
 406+ 'wikilove-title' => 'Onderwerp:',
 407+ 'wikilove-enter-message' => 'Voer een bericht in:',
 408+ 'wikilove-omit-sig' => '(zonder ondertekening)',
 409+ 'wikilove-button-preview' => 'Voorvertoning',
 410+ 'wikilove-preview' => 'Voorvertoning',
 411+ 'wikilove-notify' => 'De gebruiker een bericht sturen via e-mail',
 412+ 'wikilove-button-send' => 'Wikiwaardering versturen',
 413+ 'wikilove-type-makeyourown' => 'Uw eigen Wikiwaardering maken',
 414+ 'wikilove-err-header' => 'Geef een koptekst op.',
 415+ 'wikilove-err-title' => 'Geef een naam op.',
 416+ 'wikilove-err-msg' => 'Geef een bericht op.',
 417+ 'wikilove-err-image' => 'Selecteer een afbeelding.',
 418+ 'wikilove-err-sig' => 'Neem geen ondertekening op in dit bericht.',
 419+ 'wikilove-err-gallery' => 'Er iets misgegaan bij het laden van de afbeeldingen.',
 420+ 'wikilove-err-gallery-again' => 'Probeer het opnieuw',
 421+);
 422+
 423+/** Portuguese (Português)
 424+ * @author Hamilton Abreu
 425+ */
 426+$messages['pt'] = array(
 427+ 'wikilove-desc' => 'Adiciona uma interface para facilitar a colocação de demonstrações de apreço nas páginas de discussão dos utilizadores',
 428+ 'wikilove' => 'WikiApreço',
 429+ 'wikilove-enable-preference' => 'Permite enviar demonstrações de apreço a outros utilizadores usando o separador "WikiApreço" (experimental)',
 430+ 'wikilove-tab-text' => 'Demonstrar apreço',
 431+ 'tooltip-ca-wikilove' => 'Envie uma mensagem a este utilizador demonstrando o seu apreço',
 432+ 'wikilove-dialog-title' => 'WikiApreço',
 433+ 'wikilove-select-type' => 'Escolha o tipo',
 434+ 'wikilove-get-started-header' => 'Vamos começar!',
 435+ 'wikilove-get-started-list-1' => 'Escolha o tipo de WikiApreço que pretende enviar',
 436+ 'wikilove-get-started-list-2' => 'Acrescente detalhes ao seu WikiApreço',
 437+ 'wikilove-get-started-list-3' => 'Enviar o seu WikiApreço!',
 438+ 'wikilove-add-details' => 'Adicionar detalhes',
 439+ 'wikilove-image' => 'Imagem:',
 440+ 'wikilove-header' => 'Cabeçalho:',
 441+ 'wikilove-title' => 'Título:',
 442+ 'wikilove-enter-message' => 'Introduza uma mensagem:',
 443+ 'wikilove-omit-sig' => '(sem assinatura)',
 444+ 'wikilove-button-preview' => 'Antever',
 445+ 'wikilove-preview' => 'Antevisão',
 446+ 'wikilove-notify' => 'Notificar o utilizador por correio electrónico',
 447+ 'wikilove-button-send' => 'Enviar WikiApreço',
 448+ 'wikilove-type-makeyourown' => 'Crie o seu',
 449+ 'wikilove-err-header' => 'Introduza um cabeçalho, por favor.',
 450+ 'wikilove-err-title' => 'Introduza um título, por favor.',
 451+ 'wikilove-err-msg' => 'Introduza uma mensagem, por favor.',
 452+ 'wikilove-err-image' => 'Escolha uma imagem, por favor.',
 453+ 'wikilove-err-sig' => 'Não inclua uma assinatura na mensagem, por favor.',
 454+ 'wikilove-err-gallery' => 'Ocorreu um erro ao carregar as imagens!',
 455+ 'wikilove-err-gallery-again' => 'Tente novamente',
 456+ 'wikilove-summary' => '/* $1 */ nova mensagem de WikiApreço',
 457+);
 458+
 459+/** Telugu (తెలుగు)
 460+ * @author Veeven
 461+ */
 462+$messages['te'] = array(
 463+ 'wikilove-add-details' => 'వివరాలను చేర్చు',
 464+ 'wikilove-title' => 'శీర్షిక:',
 465+);
 466+
 467+/** Tagalog (Tagalog)
 468+ * @author AnakngAraw
 469+ */
 470+$messages['tl'] = array(
 471+ 'wikilove-desc' => 'Nagdaragdag ng isang ugnayang-mukha para sa pagpapadali ng positibong puna ng tagagamit sa mga pahina ng usapan',
 472+ 'wikilove' => 'WikiLove',
 473+ 'wikilove-enable-preference' => 'Paganahin ang pagpapakita ng pagpapahalaga para sa iba pang mga tagagamit sa pamamagitan ng panglaylay na WikiLove (sinusubukan)',
 474+ 'wikilove-tab-text' => 'Magpakita ng pagpapahalaga',
 475+ 'tooltip-ca-wikilove' => 'Magpaskil ng isang mensahe para sa tagagamit na ito na nagpapakita ng pagpapahalaga mo',
 476+ 'wikilove-dialog-title' => 'WikiLove',
 477+ 'wikilove-select-type' => 'Piliin ang uri',
 478+ 'wikilove-get-started-header' => 'Magsimula na tayo!',
 479+ 'wikilove-get-started-list-1' => 'Piliin ang uri ng WikiLove na nais mong ipadala',
 480+ 'wikilove-get-started-list-2' => 'Magdagdag ng mga detalye sa WikiLove mo',
 481+ 'wikilove-get-started-list-3' => 'Ipadala ang WikiLove mo!',
 482+ 'wikilove-add-details' => 'Magdagdag ng mga detalye',
 483+ 'wikilove-title' => 'Pamagat:',
 484+ 'wikilove-enter-message' => 'Magpasok ng isang mensahe:',
 485+ 'wikilove-omit-sig' => '(walang lagda)',
 486+ 'wikilove-button-preview' => 'Paunang tingin',
 487+ 'wikilove-preview' => 'Paunang tingin',
 488+ 'wikilove-button-send' => 'Ipadala ang WikiLove',
 489+ 'wikilove-type-makeyourown' => 'Gumawa ng sarili mo',
 490+);
 491+
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.i18n.php
___________________________________________________________________
Added: svn:eol-style
1492 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r90139Per r90124: Enabled on WMF now.raymond19:18, 15 June 2011

Comments

#Comment by Krinkle (talk | contribs)   17:49, 15 June 2011

Awesome.

Status & tagging log