r91186 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91185‎ | r91186 | r91187 >
Date:17:38, 30 June 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: Merge WikiLove to trunk state
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/WikiLove/ApiWikiLove.php (added) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/ApiWikiLoveImageLog.php (added) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.api.php (deleted) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.hooks.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.local.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.init.js (replaced) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-hover.png (deleted) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons-blue.png (added) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons-red.png (added) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons.png (deleted) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart.png (deleted) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-food.png (added) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/patches/WikiLoveImageLog.sql (added) (history)
  • /branches/wmf/1.17wmf1/extensions/WikiLove/sourcefiles (added) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.api.php
@@ -1,176 +0,0 @@
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 - // not using section => 'new' here, as we like to give our own edit summary
24 - $api = new ApiMain( new FauxRequest( array(
25 - 'action' => 'edit',
26 - 'title' => $talk->getFullText(),
27 - // need to do this, as Article::replaceSection fails for non-existing pages
28 - 'appendtext' => ( $talk->exists() ? "\n\n" : '' ) . wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
29 - . "\n\n" . $params['text'],
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 -}
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.php
@@ -16,6 +16,7 @@
1717 * http://www.gnu.org/copyleft/gpl.html
1818 *
1919 * Heart icon by Mark James (Creative Commons Attribution 3.0 License)
 20+ * Interface design by Brandon Harris
2021 */
2122
2223 /**
@@ -37,7 +38,7 @@
3839 $wgExtensionCredits['other'][] = array(
3940 'path' => __FILE__,
4041 'name' => 'WikiLove',
41 - 'version' => '0.1',
 42+ 'version' => '1.0',
4243 'url' => 'http://www.mediawiki.org/wiki/Extension:WikiLove',
4344 'author' => array(
4445 'Ryan Kaldari', 'Jan Paul Posma'
@@ -54,7 +55,8 @@
5556 $dir = dirname( __FILE__ ) . '/';
5657
5758 // add autoload classes
58 -$wgAutoloadClasses['WikiLoveApi'] = $dir . 'WikiLove.api.php';
 59+$wgAutoloadClasses['ApiWikiLove'] = $dir . 'ApiWikiLove.php';
 60+$wgAutoloadClasses['ApiWikiLoveImageLog'] = $dir . 'ApiWikiLoveImageLog.php';
5961 $wgAutoloadClasses['WikiLoveHooks'] = $dir . 'WikiLove.hooks.php';
6062 $wgAutoloadClasses['WikiLoveLocal'] = $dir . 'WikiLove.local.php';
6163
@@ -70,23 +72,36 @@
7173 $wgHooks['MakeGlobalVariablesScript'][] = 'WikiLoveHooks::makeGlobalVariablesScript';
7274
7375 // api modules
74 -$wgAPIModules['wikilove'] = 'WikiLoveApi';
 76+$wgAPIModules['wikilove'] = 'ApiWikiLove';
 77+$wgAPIModules['wikiloveimagelog'] = 'ApiWikiLoveImageLog';
7578
7679 $extWikiLoveTpl = array(
7780 'localBasePath' => dirname( __FILE__ ) . '/modules/ext.wikiLove',
7881 'remoteExtPath' => 'WikiLove/modules/ext.wikiLove',
7982 );
8083
81 -// resources
 84+// messages for default options, because we want to use them in the default
 85+// options module, but also for the user in the user options module
 86+$wgWikiLoveOptionMessages = array(
 87+ 'wikilove-type-makeyourown',
 88+);
 89+
 90+// Because of bug 29608 we can't make a dependancy on a wiki module yet
 91+// For now using 'using' to load the wiki module from within init.
8292 $wgResourceModules += array(
8393 'ext.wikiLove.icon' => $extWikiLoveTpl + array(
8494 'styles' => 'ext.wikiLove.icon.css',
8595 'position' => 'top',
8696 ),
 97+ 'ext.wikiLove.defaultOptions' => $extWikiLoveTpl + array(
 98+ 'scripts' => array(
 99+ 'ext.wikiLove.defaultOptions.js',
 100+ ),
 101+ 'messages' => $wgWikiLoveOptionMessages,
 102+ ),
87103 'ext.wikiLove.startup' => $extWikiLoveTpl + array(
88104 'scripts' => array(
89105 'ext.wikiLove.core.js',
90 - 'ext.wikiLove.defaultOptions.js',
91106 ),
92107 'styles' => 'ext.wikiLove.css',
93108 'messages' => array(
@@ -98,42 +113,50 @@
99114 'wikilove-get-started-list-3',
100115 'wikilove-add-details',
101116 'wikilove-image',
 117+ 'wikilove-select-image',
102118 'wikilove-header',
103119 'wikilove-title',
104120 'wikilove-enter-message',
105121 'wikilove-omit-sig',
 122+ 'wikilove-image-example',
106123 'wikilove-button-preview',
107124 'wikilove-preview',
108125 'wikilove-notify',
109126 'wikilove-button-send',
110 - 'wikilove-type-makeyourown',
111127 'wikilove-err-header',
112128 'wikilove-err-title',
113129 'wikilove-err-msg',
114130 'wikilove-err-image',
 131+ 'wikilove-err-image-bad',
 132+ 'wikilove-err-image-api',
115133 'wikilove-err-sig',
116134 'wikilove-err-gallery',
117135 'wikilove-err-gallery-again',
 136+ 'wikilove-what-is-this',
 137+ 'wikilove-anon-warning',
 138+ 'wikilove-commons-text',
 139+ 'wikilove-commons-link',
 140+ 'wikilove-commons-url',
 141+ 'wikilove-err-preview-api',
 142+ 'wikilove-err-send-api',
118143 ),
119144 'dependencies' => array(
 145+ 'ext.wikiLove.defaultOptions',
120146 'jquery.ui.dialog',
121147 'jquery.ui.button',
 148+ 'jquery.localize',
122149 'jquery.elastic',
123 - 'jquery.localize',
124150 ),
125151 ),
126152 'ext.wikiLove.local' => array(
127153 'class' => 'WikiLoveLocal',
128 - /* for information only, this is actually in the class!
129 - 'dependencies' => array(
130 - 'ext.wikiLove.startup',
131 - ),
132 - */
133154 ),
134155 'ext.wikiLove.init' => $extWikiLoveTpl + array(
135 - 'scripts' => 'ext.wikiLove.init.js',
 156+ 'scripts' => array(
 157+ 'ext.wikiLove.init.js',
 158+ ),
136159 'dependencies' => array(
137 - 'ext.wikiLove.local',
 160+ 'ext.wikiLove.startup',
138161 ),
139162 ),
140163 'jquery.elastic' => array(
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.hooks.php
@@ -18,9 +18,12 @@
1919 if ( $updater === null ) {
2020 global $wgExtNewTables;
2121 $wgExtNewTables[] = array( 'wikilove_log', dirname( __FILE__ ) . '/patches/WikiLoveLog.sql' );
 22+ $wgExtNewTables[] = array( 'wikilove_image_log', dirname( __FILE__ ) . '/patches/WikiLoveImageLog.sql' );
2223 } else {
2324 $updater->addExtensionUpdate( array( 'addTable', 'wikilove_log',
2425 dirname( __FILE__ ) . '/patches/WikiLoveLog.sql', true ) );
 26+ $updater->addExtensionUpdate( array( 'addTable', 'wikilove_image_log',
 27+ dirname( __FILE__ ) . '/patches/WikiLoveImageLog.sql', true ) );
2528 }
2629 return true;
2730 }
@@ -56,9 +59,8 @@
5760
5861 $title = self::getUserTalkPage( $skin->getTitle() );
5962 if ( !is_null( $title ) ) {
60 - $out->addModules( 'ext.wikiLove.icon' );
61 - $out->addModules( 'ext.wikiLove.init' );
62 - self::$recipient = $title->getText();
 63+ $out->addModules( array( 'ext.wikiLove.icon', 'ext.wikiLove.init' ) );
 64+ self::$recipient = $title->getBaseText();
6365 }
6466 return true;
6567 }
@@ -70,6 +72,12 @@
7173 global $wgUser;
7274 $vars['wikilove-recipient'] = self::$recipient;
7375 $vars['wikilove-edittoken'] = $wgUser->edittoken();
 76+
 77+ $vars['wikilove-anon'] = 0;
 78+ if ( self::$recipient !== '' ) {
 79+ $receiver = User::newFromName( self::$recipient );
 80+ if ( $receiver === false || $receiver->isAnon() ) $vars['wikilove-anon'] = 1;
 81+ }
7482 return true;
7583 }
7684
@@ -104,7 +112,9 @@
105113 */
106114 private static function skinConfigViewsLinks( $skin, &$views ) {
107115 global $wgWikiLoveGlobal, $wgUser;
108 - if ( !$wgWikiLoveGlobal && !$wgUser->getOption( 'wikilove-enabled' ) ) return true;
 116+ if ( !$wgWikiLoveGlobal && !$wgUser->getOption( 'wikilove-enabled' ) ) {
 117+ return true;
 118+ }
109119
110120 if ( !is_null( self::getUserTalkPage( $skin->getTitle() ) ) ) {
111121 $views['wikilove'] = array(
@@ -144,7 +154,9 @@
145155
146156 $ns = $title->getNamespace();
147157 // return quickly if we're in the wrong namespace anyway
148 - if ( $ns != NS_USER && $ns != NS_USER_TALK ) return null;
 158+ if ( $ns != NS_USER && $ns != NS_USER_TALK ) {
 159+ return null;
 160+ }
149161
150162 $baseTitle = Title::newFromText( $title->getBaseText(), $ns );
151163
Index: branches/wmf/1.17wmf1/extensions/WikiLove/sourcefiles/WikiLove-Icon-Source.psd
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/sourcefiles/WikiLove-Icon-Source.psd
___________________________________________________________________
Added: svn:mime-type
152164 + application/octet-stream
Index: branches/wmf/1.17wmf1/extensions/WikiLove/patches/WikiLoveImageLog.sql
@@ -0,0 +1,16 @@
 2+--
 3+-- WikiLove image logging schema
 4+-- Logs every time someone attempts to preview an award with a user-entered image title.
 5+-- This is mainly to see if people understand the idea of using images from Commons.
 6+--
 7+
 8+CREATE TABLE IF NOT EXISTS /*_*/wikilove_image_log (
 9+ wlil_id int(11) NOT NULL PRIMARY KEY auto_increment,
 10+ wlil_timestamp binary(14) NOT NULL,
 11+ wlil_user_id int(11) NOT NULL,
 12+ wlil_image varchar(128) NOT NULL,
 13+ wlil_success bool NOT NULL
 14+) /*$wgDBTableOptions*/;
 15+
 16+CREATE INDEX /*i*/wlil_timestamp ON /*_*/wikilove_image_log (wlil_timestamp);
 17+CREATE INDEX /*i*/wlil_user_time ON /*_*/wikilove_image_log (wlil_user_id, wlil_timestamp);
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/patches/WikiLoveImageLog.sql
___________________________________________________________________
Added: svn:eol-style
118 + native
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.local.php
@@ -9,9 +9,8 @@
1010 );
1111 }
1212
13 - public function getDependencies() {
14 - return array(
15 - 'ext.wikiLove.startup',
16 - );
 13+ public function getMessages() {
 14+ global $wgWikiLoveOptionMessages;
 15+ return $wgWikiLoveOptionMessages;
1716 }
1817 }
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/jquery.elastic/jquery.elastic.js
@@ -1,7 +1,7 @@
22 /**
33 * @name Elastic
44 * @descripton Elastic is jQuery plugin that grow and shrink your textareas automatically
5 -* @version 1.6.5
 5+* @version 1.6.10
66 * @requires jQuery 1.2.6+
77 *
88 * @author Jan Jarfalk
@@ -29,22 +29,35 @@
3030 'lineHeight',
3131 'fontFamily',
3232 'width',
33 - 'fontWeight'];
 33+ 'fontWeight',
 34+ 'border-top-width',
 35+ 'border-right-width',
 36+ 'border-bottom-width',
 37+ 'border-left-width',
 38+ 'borderTopStyle',
 39+ 'borderTopColor',
 40+ 'borderRightStyle',
 41+ 'borderRightColor',
 42+ 'borderBottomStyle',
 43+ 'borderBottomColor',
 44+ 'borderLeftStyle',
 45+ 'borderLeftColor'
 46+ ];
3447
3548 return this.each( function() {
3649
3750 // Elastic only works on textareas
38 - if ( this.type != 'textarea' ) {
 51+ if ( this.type !== 'textarea' ) {
3952 return false;
4053 }
 54+
 55+ var $textarea = jQuery(this),
 56+ $twin = jQuery('<div />').css({'position': 'absolute','display':'none','word-wrap':'break-word'}),
 57+ lineHeight = parseInt($textarea.css('line-height'),10) || parseInt($textarea.css('font-size'),'10'),
 58+ minheight = parseInt($textarea.css('height'),10) || lineHeight*3,
 59+ maxheight = parseInt($textarea.css('max-height'),10) || Number.MAX_VALUE,
 60+ goalheight = 0;
4161
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 -
4962 // Opera returns max-height of -1 if not set
5063 if (maxheight < 0) { maxheight = Number.MAX_VALUE; }
5164
@@ -58,18 +71,32 @@
5972 $twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));
6073 }
6174
 75+ // Updates the width of the twin. (solution for textareas with widths in percent)
 76+ function setTwinWidth(){
 77+ curatedWidth = Math.floor(parseInt($textarea.width(),10));
 78+ if($twin.width() !== curatedWidth){
 79+ $twin.css({'width': curatedWidth + 'px'});
 80+
 81+ // Update height of textarea
 82+ update(true);
 83+ }
 84+ }
6285
6386 // Sets a given height and overflow state on the textarea
6487 function setHeightAndOverflow(height, overflow){
 88+
6589 var curratedHeight = Math.floor(parseInt(height,10));
66 - if($textarea.height() != curratedHeight){
 90+ if($textarea.height() !== curratedHeight){
6791 $textarea.css({'height': curratedHeight + 'px','overflow':overflow});
 92+
 93+ // Fire the custom event resize
 94+ //$textarea.trigger('resize');
 95+
6896 }
6997 }
7098
71 -
7299 // This function will update the height of the textarea if necessary
73 - function update() {
 100+ function update(forced) {
74101
75102 // Get curated content from the textarea.
76103 var textareaContent = $textarea.val().replace(/&/g,'&amp;').replace(/ {2}/g, '&nbsp;').replace(/<|>/g, '&gt;').replace(/\n/g, '<br />');
@@ -77,7 +104,7 @@
78105 // Compare curated content with curated twin.
79106 var twinContent = $twin.html().replace(/<br>/ig,'<br />');
80107
81 - if(textareaContent+'&nbsp;' != twinContent){
 108+ if(forced || textareaContent+'&nbsp;' !== twinContent){
82109
83110 // Add an extra white space so new rows are added when you are at the end of a row.
84111 $twin.html(textareaContent+'&nbsp;');
@@ -108,8 +135,12 @@
109136 update();
110137 });
111138
 139+ // Update width of twin if browser or textarea is resized (solution for textareas with widths in percent)
 140+ $(window).bind('resize', setTwinWidth);
 141+ $textarea.bind('resize', setTwinWidth);
 142+ $textarea.bind('update', update);
 143+
112144 // Compact textarea on blur
113 - // Lets animate this....
114145 $textarea.bind('blur',function(){
115146 if($twin.height() < maxheight){
116147 if($twin.height() > minheight) {
@@ -121,7 +152,7 @@
122153 });
123154
124155 // And this line is to catch the browser paste event
125 - $textarea.live('input paste',function(e){ setTimeout( update, 250); });
 156+ $textarea.bind('input paste',function(e){ setTimeout( update, 250); });
126157
127158 // Run update once when elastic is initialized
128159 update();
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css
@@ -1,3 +1,7 @@
 2+.ui-widget-overlay {
 3+ min-height: 750px;
 4+}
 5+
26 /* dialog */
37 #mw-wikilove-dialog {
48 margin: 10px;
@@ -3,4 +7,9 @@
48 }
59
 10+#mw-wikilove-preview-form {
 11+ position: relative;
 12+ clear: both; /* for monobook skin */
 13+}
 14+
615 /* dialog type selection */
716 /*#mw-wikilove-dialog*/ #mw-wikilove-select-type {
@@ -202,7 +211,7 @@
203212 }
204213
205214 /*#mw-wikilove-dialog #mw-wikilove-add-details*/ #mw-wikilove-subtype-description {
206 - margin: 5px 0px 8px 15px;
 215+ margin: 5px 85px 8px 15px;
207216 font-size: 1.0em;
208217 line-height: 1.2em;
209218 }
@@ -210,7 +219,6 @@
211220 /*#mw-wikilove-dialog*/ #mw-wikilove-add-details .mw-wikilove-note {
212221 font-weight: light;
213222 font-size: 0.9em;
214 - float: right;
215223 color: #999;
216224 }
217225
@@ -218,6 +226,10 @@
219227 resize: none;
220228 }
221229
 230+/*#mw-wikilove-dialog*/ #mw-wikilove-commons-text {
 231+ margin: 5px 0px 5px 15px;
 232+}
 233+
222234 /* add details gallery */
223235 /*#mw-wikilove-dialog*/ #mw-wikilove-gallery {
224236 min-height: 40px;
@@ -336,3 +348,25 @@
337349 padding-left: 34px;
338350 padding-bottom: 3px;
339351 }
 352+
 353+#mw-wikilove-dialog #mw-wikilove-image-preview {
 354+ position: absolute;
 355+ top: 1em;
 356+ right: 0;
 357+ width: 75px;
 358+ height: 68px;
 359+}
 360+
 361+#mw-wikilove-dialog #mw-wikilove-image-preview-content {
 362+ text-align: center;
 363+}
 364+
 365+#mw-wikilove-dialog #mw-wikilove-image-preview-spinner {
 366+ float: none;
 367+ margin-left:auto;
 368+ margin-right:auto;
 369+}
 370+
 371+#mw-wikilove-dialog a {
 372+ color: #0645AD;
 373+}
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js
@@ -1,7 +1,7 @@
22 ( function( $ ) {
3 -$.wikiLove.optionsHook = function() { return {
 3+$.wikiLoveOptions = {
44 defaultText: '{| style="background-color: $5; border: 1px solid $6;"\n\
5 -|rowspan="2" style="vertical-align: middle; padding: 5px;" | [[File:$3|$4]]\n\
 5+|rowspan="2" style="vertical-align: middle; padding: 5px;" | [[$3|$4]]\n\
66 |style="font-size: x-large; padding: 3px; height: 1.5em;" | \'\'\'$2\'\'\'\n\
77 |-\n\
88 |style="vertical-align: middle; padding: 3px;" | $1 ~~~~\n\
@@ -9,293 +9,356 @@
1010 defaultBackgroundColor: '#fdffe7',
1111 defaultBorderColor: '#fceb92',
1212 defaultImageSize: '100px',
13 - defaultImage: 'Emblem-fun.svg',
 13+ defaultImage: 'Trophy.png',
1414
1515 types: {
1616 // example type, could be removed later (also no i18n)
1717 'barnstar': {
18 - name: 'Barnstar', // name of the type (appears in the types menu)
 18+ name: 'Barnstars', // name of the type (appears in the types menu)
1919 select: 'Select a barnstar:', // subtype select label
2020 subtypes: { // some different subtypes
2121 // note that when not using subtypes you should use these subtype options
2222 // for the top-level type
2323 'original': {
24 - fields: [ 'notify' ], // fields to ask for in form
 24+ fields: [ 'message' ], // fields to ask for in form
2525 option: 'Original Barnstar', // option listed in the select list
2626 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
2727 header: 'A barnstar for you!', // header that appears at the top of the talk page post (optional)
2828 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
 29+ image: 'Original Barnstar Hires.png' // image for the award
3130 },
3231 'admins': {
33 - fields: [ 'notify' ],
 32+ fields: [ 'message' ],
3433 option: 'Admin\'s Barnstar',
3534 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.',
3635 header: 'A barnstar for you!',
3736 title: 'The Admin\'s Barnstar',
38 - image: 'Administrator Barnstar Hires.png',
39 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 37+ image: 'Administrator Barnstar Hires.png'
4038 },
4139 'antivandalism': {
42 - fields: [ 'notify' ],
 40+ fields: [ 'message' ],
4341 option: 'Anti-Vandalism Barnstar',
4442 descr: 'The Anti-Vandalism Barnstar may be awarded to those who show great contributions to protecting and reverting attacks of vandalism on Wikipedia.',
4543 header: 'A barnstar for you!',
4644 title: 'The Anti-Vandalism Barnstar',
47 - image: 'Barnstar of Reversion Hires.png',
48 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 45+ image: 'Barnstar of Reversion Hires.png'
4946 },
5047 'diligence': {
51 - fields: [ 'notify' ],
 48+ fields: [ 'message' ],
5249 option: 'Barnstar of Diligence',
5350 descr: 'The Barnstar of Diligence may be awarded in recognition of a combination of extraordinary scrutiny, precision and community service.',
5451 header: 'A barnstar for you!',
5552 title: 'The Barnstar of Diligence',
56 - image: 'Barnstar of Diligence Hires.png',
57 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 53+ image: 'Barnstar of Diligence Hires.png'
5854 },
5955 'diplomacy': {
60 - fields: [ 'notify' ],
 56+ fields: [ 'message' ],
6157 option: 'Barnstar of Diplomacy',
6258 descr: 'The Barnstar of Diplomacy is awarded to users who have helped to resolve, peacefully, conflicts on Wikipedia.',
6359 header: 'A barnstar for you!',
6460 title: 'The Barnstar of Diplomacy',
65 - image: 'Peace Barnstar Hires.png',
66 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 61+ image: 'Peace Barnstar Hires.png'
6762 },
6863 'goodhumor': {
69 - fields: [ 'notify' ],
 64+ fields: [ 'message' ],
7065 option: 'Barnstar of Good Humor',
7166 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.',
7267 header: 'A barnstar for you!',
7368 title: 'The Barnstar of Good Humor',
74 - image: 'Barnstar of Reversion Hires.png',
75 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 69+ image: 'Barnstar of Humour Hires.png'
7670 },
7771 'brilliant': {
78 - fields: [ 'notify' ],
 72+ fields: [ 'message' ],
7973 option: 'Brilliant Idea Barnstar',
8074 descr: 'The Brilliant Idea Barnstar may be awarded to a user who figures out an elegant solution to a particularly difficult problem.',
8175 header: 'A barnstar for you!',
8276 title: 'The Brilliant Idea Barnstar',
83 - image: 'Brilliant Idea Barnstar Hires.png',
84 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 77+ image: 'Brilliant Idea Barnstar Hires.png'
8578 },
8679 'citation': {
87 - fields: [ 'notify' ],
 80+ fields: [ 'message' ],
8881 option: 'Citation Barnstar',
8982 descr: 'The Citation Barnstar is awarded to users who provide references and in-line citations to previously unsourced articles.',
9083 header: 'A barnstar for you!',
9184 title: 'The Citation Barnstar',
92 - image: 'Citation Barnstar Hires.png',
93 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 85+ image: 'Citation Barnstar Hires.png'
9486 },
9587 'civility': {
96 - fields: [ 'notify' ],
 88+ fields: [ 'message' ],
9789 option: 'Civility Barnstar',
9890 descr: 'The Civility Barnstar may be awarded to any user who excels at maintaining civility in the midst of contentious situations.',
9991 header: 'A barnstar for you!',
10092 title: 'The Civility Barnstar',
101 - image: 'Civility Barnstar Hires.png',
102 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 93+ image: 'Civility Barnstar Hires.png'
10394 },
10495 'copyeditor': {
105 - fields: [ 'notify' ],
 96+ fields: [ 'message' ],
10697 option: 'Copyeditor\'s Barnstar',
10798 descr: 'The Copyeditor\'s Barnstar is awarded for excellence in correcting spelling, grammar, punctuation, and style issues.',
10899 header: 'A barnstar for you!',
109100 title: 'The Copyeditor\'s Barnstar',
110 - image: 'Copyeditor Barnstar Hires.png',
111 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 101+ image: 'Copyeditor Barnstar Hires.png'
112102 },
113103 'defender': {
114 - fields: [ 'notify' ],
 104+ fields: [ 'message' ],
115105 option: 'Defender of the Wiki Barnstar',
116106 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.',
117107 header: 'A barnstar for you!',
118108 title: 'The Defender of the Wiki Barnstar',
119 - image: 'WikiDefender Barnstar Hires.png',
120 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 109+ image: 'WikiDefender Barnstar Hires.png'
121110 },
122111 'editors': {
123 - fields: [ 'notify' ],
 112+ fields: [ 'message' ],
124113 option: 'Editor\'s Barnstar',
125114 descr: 'The Editor\'s Barnstar is awarded to individuals who display particularly fine decisions in general editing.',
126115 header: 'A barnstar for you!',
127116 title: 'The Editor\'s Barnstar',
128 - image: 'Editors Barnstar Hires.png',
129 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 117+ image: 'Editors Barnstar Hires.png'
130118 },
131119 'designers': {
132 - fields: [ 'notify' ],
 120+ fields: [ 'message' ],
133121 option: 'Graphic Designer\'s Barnstar',
134122 descr: 'The Graphic Designer\'s Barnstar may be awarded to those who work tirelessly to provide Wikipedia with free, high-quality graphics.',
135123 header: 'A barnstar for you!',
136124 title: 'The Graphic Designer\'s Barnstar',
137 - image: 'Rosetta Barnstar Hires.png',
138 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 125+ image: 'Rosetta Barnstar Hires.png'
139126 },
140127 'half': {
141 - fields: [ 'notify' ],
 128+ fields: [ 'message' ],
142129 option: 'Half Barnstar',
143130 descr: 'The Half Barnstar is awarded for excellence in cooperation, especially for productive editing with someone who holds an opposing viewpoint.',
144131 header: 'A barnstar for you!',
145132 title: 'The Half Barnstar',
146 - image: 'Halfstar Hires.png',
147 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 133+ image: 'Halfstar Hires.png'
148134 },
149135 'minor': {
150 - fields: [ 'notify' ],
 136+ fields: [ 'message' ],
151137 option: 'Minor Barnstar',
152138 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.',
153139 header: 'A barnstar for you!',
154140 title: 'The Minor barnstar',
155 - image: 'Minor Barnstar Hires.png',
156 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 141+ image: 'Minor Barnstar Hires.png'
157142 },
158143 'antispam': {
159 - fields: [ 'notify' ],
 144+ fields: [ 'message' ],
160145 option: 'No Spam Barnstar',
161146 descr: 'The Anti-Spam Barnstar is awarded to users who do an exceptional job fighting against spam on Wikipedia.',
162147 header: 'A barnstar for you!',
163148 title: 'The No Spam Barnstar',
164 - image: 'No Spam Barnstar Hires.png',
165 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 149+ image: 'No Spam Barnstar Hires.png'
166150 },
167151 'photographers': {
168 - fields: [ 'notify' ],
 152+ fields: [ 'message' ],
169153 option: 'Photographer\'s Barnstar',
170154 descr: 'The Photographer\'s Barnstar is awarded to those individuals who tirelessly improve the Wikipedia with their photographic skills and contributions.',
171155 header: 'A barnstar for you!',
172156 title: 'The Photographer\'s Barnstar',
173 - image: 'Camera Barnstar Hires.png',
174 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 157+ image: 'Camera Barnstar Hires.png'
175158 },
176159 'kindness': {
177 - fields: [ 'notify' ],
 160+ fields: [ 'message' ],
178161 option: 'Random Acts of Kindness Barnstar',
179162 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.',
180163 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.'
 164+ title: 'The Random Acts of Kindness Barnstar',
 165+ image: 'Kindness Barnstar Hires.png'
184166 },
185167 'reallife': {
186 - fields: [ 'notify' ],
 168+ fields: [ 'message' ],
187169 option: 'Real Life Barnstar',
188170 descr: 'The Real Life Barnstar is awarded to editors who make contributions both online and offline, by organizing wiki-related real-life events.',
189171 header: 'A barnstar for you!',
190172 title: 'The Real Life Barnstar',
191 - image: 'Real Life Barnstar.jpg',
192 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 173+ image: 'Real Life Barnstar.jpg'
193174 },
194175 'resilient': {
195 - fields: [ 'notify' ],
 176+ fields: [ 'message' ],
196177 option: 'Resilient Barnstar',
197178 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.',
198179 header: 'A barnstar for you!',
199180 title: 'The Resilient Barnstar',
200 - image: 'Resilient Barnstar Hires.png',
201 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 181+ image: 'Resilient Barnstar Hires.png'
202182 },
203183 'rosetta': {
204 - fields: [ 'notify' ],
 184+ fields: [ 'message' ],
205185 option: 'Rosetta Barnstar',
206186 descr: 'The Rosetta Barnstar may be given to any editor who exhibits outstanding translation efforts on Wikipedia.',
207187 header: 'A barnstar for you!',
208188 title: 'The Rosetta Barnstar',
209 - image: 'Rosetta Barnstar Hires.png',
210 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 189+ image: 'Rosetta Barnstar Hires.png'
211190 },
212191 'special': {
213 - fields: [ 'notify' ],
 192+ fields: [ 'message' ],
214193 option: 'Special Barnstar',
215194 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.',
216195 header: 'A barnstar for you!',
217196 title: 'The Special Barnstar',
218 - image: 'Special Barnstar Hires.png',
219 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 197+ image: 'Special Barnstar Hires.png'
220198 },
221199 'surreal': {
222 - fields: [ 'notify' ],
 200+ fields: [ 'message' ],
223201 option: 'Surreal Barnstar',
224202 descr: 'The Surreal Barnstar may be awarded to any Wikipedian who adds "special flavor" to the community by acting as a sort of wildcard.',
225203 header: 'A barnstar for you!',
226204 title: 'The Surreal Barnstar',
227 - image: 'Surreal Barnstar Hires.png',
228 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 205+ image: 'Surreal Barnstar Hires.png'
229206 },
230207 'teamwork': {
231 - fields: [ 'notify' ],
 208+ fields: [ 'message' ],
232209 option: 'Teamwork Barnstar',
233210 descr: 'The Teamwork Barnstar may be awarded when several editors work together to improve an article.',
234211 header: 'A barnstar for you!',
235212 title: 'The Teamwork Barnstar',
236 - image: 'Team Barnstar Hires.png',
237 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 213+ image: 'Team Barnstar Hires.png'
238214 },
239215 'technical': {
240 - fields: [ 'notify' ],
 216+ fields: [ 'message' ],
241217 option: 'Technical Barnstar',
242218 descr: 'The Technical Barnstar may be awarded to anyone who has enhanced Wikipedia through their technical work (programming, bot building, link repair, etc.).',
243219 header: 'A barnstar for you!',
244220 title: 'The Technical Barnstar',
245 - image: 'Vitruvian Barnstar Hires.png',
246 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 221+ image: 'Vitruvian Barnstar Hires.png'
247222 },
248223 'tireless': {
249 - fields: [ 'notify' ],
 224+ fields: [ 'message' ],
250225 option: 'Tireless Contributor Barnstar',
251226 descr: 'The Tireless Contributor Barnstar is awarded to especially tireless Wikipedians who contribute an especially large body of work without sacrificing quality.',
252227 header: 'A barnstar for you!',
253228 title: 'The Tireless Contributor Barnstar',
254 - image: 'Tireless Contributor Barnstar Hires.gif',
255 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 229+ image: 'Tireless Contributor Barnstar Hires.gif'
256230 },
257231 'writers': {
258 - fields: [ 'notify' ],
 232+ fields: [ 'message' ],
259233 option: 'Writer\'s Barnstar',
260234 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.',
261235 header: 'A barnstar for you!',
262236 title: 'The Writer\'s Barnstar',
263 - image: 'Writers Barnstar Hires.png',
264 - email: 'Hello $7!\n\nI just awarded you a barnstar.'
 237+ image: 'Writers Barnstar Hires.png'
265238 }
266239 },
267240 icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-barnstar.png' // icon for left-side menu
268241 },
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
 242+ 'food': {
 243+ name: 'Food and drink', // name of the type (appears in the types menu)
 244+ select: 'Select food or drink item:', // subtype select label
 245+ text: '{| style="background-color: $5; border: 1px solid $6;"\n\
 246+|style="vertical-align: middle; padding: 5px;" | [[$3|$4]]\n\
 247+|style="vertical-align: middle; padding: 3px;" | $1 ~~~~\n\
 248+|}', // custom text
 249+ subtypes: { // some different subtypes
 250+ // note that when not using subtypes you should use these subtype options
 251+ // for the top-level type
 252+ 'baklava': {
 253+ fields: [ 'header', 'message' ], // fields to ask for in form
 254+ option: 'Baklava', // option listed in the select list
 255+ descr: 'Baklava is a rich, sweet pastry made of layers of filo pastry filled with chopped nuts and sweetened with syrup or honey.',
 256+ header: 'Some baklava for you!', // header that appears at the top of the talk page post (optional)
 257+ image: 'Baklava - Turkish special, 80-ply.JPEG', // image for the award
 258+ imageSize: '135px' // size to display image
 259+ },
 260+ 'beer': {
 261+ fields: [ 'header', 'message' ],
 262+ option: 'Beer',
 263+ descr: 'Beer is the world\'s most widely consumed and probably oldest alcoholic beverage. It is the third most popular drink after water and tea.',
 264+ header: 'A beer for you!',
 265+ image: 'Export hell seidel steiner.png',
 266+ imageSize: '70px'
 267+ },
 268+ 'brownie': {
 269+ fields: [ 'header', 'message' ],
 270+ option: 'Brownie',
 271+ descr: 'A brownie is a flat, baked square or bar made of dense, rich chocolate cake.',
 272+ header: 'A brownie for you!',
 273+ image: 'Brownie transparent.png',
 274+ imageSize: '120px'
 275+ },
 276+ 'bubble tea': {
 277+ fields: [ 'header', 'message' ],
 278+ option: 'Bubble tea',
 279+ descr: 'Bubble tea is a tea or juice beverage containing small chewy balls made of tapioca starch or jelly. First invented in Taiwan, it is now popular in many areas of the world.',
 280+ header: 'Some bubble tea for you!',
 281+ image: 'Bubble_Tea.png',
 282+ imageSize: '65px'
 283+ },
 284+ 'cheeseburger': {
 285+ fields: [ 'header', 'message' ],
 286+ option: 'Cheeseburger',
 287+ descr: 'A staple of diners and fast-food restaurants, cheeseburgers were first popularized in the United States during the 1920s and 30s.',
 288+ header: 'A cheeseburger for you!',
 289+ image: 'Cheeseburger.png',
 290+ imageSize: '120px'
 291+ },
 292+ 'cookie': {
 293+ fields: [ 'header', 'message' ],
 294+ option: 'Cookie',
 295+ descr: 'Cookies (known as biscuits in the UK) come in a wide array of flavors, shapes, and sizes.',
 296+ header: 'A cookie for you!',
 297+ image: 'Choco_chip_cookie.png',
 298+ imageSize: '120px'
 299+ },
 300+ 'coffee': {
 301+ fields: [ 'header', 'message' ],
 302+ option: 'Cup of coffee',
 303+ descr: 'Appreciated the world over, coffee is known for its energizing effect on people.',
 304+ header: 'A cup of coffee for you!',
 305+ image: 'A small cup of coffee.JPG',
 306+ imageSize: '120px'
 307+ },
 308+ 'tea': {
 309+ fields: [ 'header', 'message' ],
 310+ option: 'Cup of tea',
 311+ descr: 'After water, tea is the most widely consumed beverage in the world. It can be enjoyed hot or cold, with milk or sugar.',
 312+ header: 'A cup of tea for you!',
 313+ image: 'Meissen-teacup pinkrose01.jpg',
 314+ imageSize: '120px'
 315+ },
 316+ 'cupcake': {
 317+ fields: [ 'header', 'message' ],
 318+ option: 'Cupcake',
 319+ descr: 'A cupcake is a small cake designed to serve one person. They are often served with frosting and sprikles on top.',
 320+ header: 'A cupcake for you!',
 321+ image: 'Choco-Nut Bake with Meringue Top cropped.jpg',
 322+ imageSize: '120px'
 323+ },
 324+ 'pie': {
 325+ fields: [ 'header', 'message' ],
 326+ option: 'Pie',
 327+ descr: 'Pies can be filled with a wide variety of sweet or savoury ingredients.',
 328+ header: 'A pie for you!',
 329+ image: 'A very beautiful Nectarine Pie.jpg',
 330+ imageSize: '120px'
 331+ },
 332+ 'stroopwafels': {
 333+ fields: [ 'header', 'message' ],
 334+ option: 'Stroopwafels',
 335+ descr: 'A stroopwafel is a Dutch snack made from two thin layers of baked batter with a caramel-like syrup filling in the middle.',
 336+ header: 'Some stroopwafels for you!',
 337+ image: 'Gaufre biscuit.jpg',
 338+ imageSize: '135px'
 339+ }
278340 },
279 - icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-beer.png' // icon for left-side menu
 341+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-food.png'
280342 },
281343 'kitten': {
282 - name: 'Kitten',
283 - fields: [ 'header' ],
 344+ name: 'Kittens',
 345+ fields: [ 'header', 'message' ],
284346 header: 'A kitten for you!',
285347 text: '[[$3|left|150px]]\n$1\n\n~~~~\n<br style="clear: both"/>', // $3 is the image filename
286348 gallery: {
287 - imageList: [ 'Cucciolo gatto Bibo.jpg','Kitten (06) by Ron.jpg','Kitten-stare.jpg', 'Cat03.jpg', 'Kot_Leon.JPG', 'Greycat.jpg' ],
 349+ imageList: [ 'Cucciolo gatto Bibo.jpg', 'Kitten (06) by Ron.jpg', 'Kitten-stare.jpg', 'Red Kitten 01.jpg', 'Kitten in a helmet.jpg', 'Cute grey kitten.jpg' ],
288350 width: 145,
 351+ height: 150,
289352 number: 3
290353 },
291 - icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-kitten.png' // icon for left-side menu
 354+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-kitten.png'
292355 },
293356 // default type, nice to leave this one in place when adding other types
294357 'makeyourown': {
295358 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
 359+ fields: [ 'header', 'title', 'image', 'message' ],
 360+ icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-create.png'
299361 }
300362 }
301 -}; };
 363+};
 364+
302365 } )( jQuery );
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.init.js
@@ -1,3 +1 @@
2 -( function( $ ) {
3 -$( document ).ready( $.wikiLove.init );
4 -} )( jQuery );
 2+mw.loader.using( 'ext.wikiLove.local', jQuery.wikiLove.init );
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
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
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
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons-blue.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-blue.png
___________________________________________________________________
Added: svn:mime-type
53 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/heart-icons-red.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-red.png
___________________________________________________________________
Added: svn:mime-type
64 + image/png
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-food.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-food.png
___________________________________________________________________
Added: svn:mime-type
75 + application/octet-stream
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css
@@ -31,7 +31,7 @@
3232 height: 0;
3333 overflow: hidden;
3434 /* @embed */
35 - background-image: url(images/heart-icons.png);
 35+ background-image: url(images/heart-icons-red.png);
3636 }
3737 #ca-wikilove.icon a {
3838 background-position: 5px 60%;
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -1,18 +1,15 @@
22 ( function( $ ) {
3 -$.wikiLove = (function(){
43
54 var options = {}, // options modifiable by the user
65 $dialog = null, // dialog jQuery object
76 currentTypeId = null, // id of the currently selected type (e.g. 'barnstar' or 'makeyourown')
87 currentSubtypeId = null, // id of the currently selected subtype (e.g. 'original' or 'special')
98 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
 9+ rememberData = null, // input data to remember when switching types or subtypes
1110 emailable = false,
1211 gallery = {};
13 -
14 -return {
15 - optionsHook: function() { return {}; }, // hook that can be overridden by the user to modify options
16 -
 12+
 13+$.wikiLove = {
1714 /*
1815 * Opens the dialog and builds it if necessary.
1916 */
@@ -58,15 +55,23 @@
5956 <li><html:msg key="wikilove-get-started-list-2"/></li>\
6057 <li><html:msg key="wikilove-get-started-list-3"/></li>\
6158 </ol>\
 59+ <p><a target="_blank" href="http://www.mediawiki.org/wiki/WikiLove">\
 60+ <html:msg key="wikilove-what-is-this"/>\
 61+ </a></p>\
 62+ <p id="mw-wikilove-anon-warning"><strong><html:msg key="wikilove-anon-warning"/></strong></p>\
6263 </div>\
6364 <div id="mw-wikilove-add-details">\
6465 <span class="mw-wikilove-number">2</span>\
6566 <h3><html:msg key="wikilove-add-details"/></h3>\
6667 <form id="mw-wikilove-preview-form">\
 68+ <div id="mw-wikilove-image-preview">\
 69+ <div id="mw-wikilove-image-preview-spinner" class="mw-wikilove-spinner"></div>\
 70+ <div id="mw-wikilove-image-preview-content"></div>\
 71+ </div>\
6772 <label for="mw-wikilove-subtype" id="mw-wikilove-subtype-label"></label>\
6873 <select id="mw-wikilove-subtype"></select>\
6974 <div id="mw-wikilove-subtype-description"></div>\
70 - <label id="mw-wikilove-gallery-label"><html:msg key="wikilove-image"/></label>\
 75+ <label id="mw-wikilove-gallery-label"><html:msg key="wikilove-select-image"/></label>\
7176 <div id="mw-wikilove-gallery">\
7277 <div id="mw-wikilove-gallery-error">\
7378 <html:msg key="wikilove-err-gallery"/>\
@@ -80,9 +85,13 @@
8186 <label for="mw-wikilove-title" id="mw-wikilove-title-label"><html:msg key="wikilove-title"/></label>\
8287 <input type="text" class="text" id="mw-wikilove-title"/>\
8388 <label for="mw-wikilove-image" id="mw-wikilove-image-label"><html:msg key="wikilove-image"/></label>\
 89+ <span class="mw-wikilove-note" id="mw-wikilove-image-note"><html:msg key="wikilove-image-example"/></span>\
8490 <input type="text" class="text" id="mw-wikilove-image"/>\
 91+ <div id="mw-wikilove-commons-text">\
 92+ ' + mw.msg( 'wikilove-commons-text', '<a href="' + mw.msg( 'wikilove-commons-url' ) + '" target="_blank">' + mw.msg( 'wikilove-commons-link' ) +'</a>' ) + '\
 93+ </div>\
8594 <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>\
 95+ <span class="mw-wikilove-note" id="mw-wikilove-message-note"><html:msg key="wikilove-omit-sig"/></span>\
8796 <textarea id="mw-wikilove-message"></textarea>\
8897 <div id="mw-wikilove-notify">\
8998 <input type="checkbox" id="mw-wikilove-notify-checkbox" name="notify"/>\
@@ -113,17 +122,40 @@
114123 resizable: false
115124 });
116125
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' ) } );
 126+ if ( mw.config.get( 'skin' ) == 'vector' ) {
 127+ $( '#mw-wikilove-button-preview' ).button( {
 128+ label: mw.msg( 'wikilove-button-preview' ),
 129+ icons: {
 130+ primary:'ui-icon-search'
 131+ }
 132+ } );
 133+ } else {
 134+ $( '#mw-wikilove-button-preview' ).button( {
 135+ label: mw.msg( 'wikilove-button-preview' )
 136+ } );
 137+ }
 138+ $( '#mw-wikilove-button-send' ).button( {
 139+ label: mw.msg( 'wikilove-button-send' )
 140+ } );
119141 $( '#mw-wikilove-add-details' ).hide();
120142 $( '#mw-wikilove-preview' ).hide();
121143 $( '#mw-wikilove-types' ).replaceWith( $typeList );
122144 $( '#mw-wikilove-gallery-error-again' ).click( $.wikiLove.showGallery );
123145 $( '#mw-wikilove-types a' ).click( $.wikiLove.clickType );
124146 $( '#mw-wikilove-subtype' ).change( $.wikiLove.changeSubtype );
125 - $( '#mw-wikilove-preview-form' ).submit( $.wikiLove.submitPreview );
 147+ $( '#mw-wikilove-preview-form' ).submit( $.wikiLove.validatePreviewForm );
126148 $( '#mw-wikilove-send-form' ).click( $.wikiLove.submitSend );
127149 $( '#mw-wikilove-message' ).elastic(); // have the message textarea grow automatically
 150+
 151+ if ( mw.config.get( 'wikilove-anon' ) === 0 ) {
 152+ $( '#mw-wikilove-anon-warning' ).hide();
 153+ }
 154+
 155+ // When the image changes, we want to reset the preview and error message.
 156+ $( '#mw-wikilove-image' ).change( function() {
 157+ $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove();
 158+ $( '#mw-wikilove-preview' ).hide();
 159+ } );
128160 }
129161
130162 $dialog.dialog( 'open' );
@@ -135,6 +167,7 @@
136168 */
137169 clickType: function( e ) {
138170 e.preventDefault();
 171+ $.wikiLove.rememberInputData(); // remember previously entered data
139172 $( '#mw-wikilove-get-started' ).hide(); // always hide the get started section
140173
141174 var newTypeId = $( this ).data( 'typeId' );
@@ -171,12 +204,12 @@
172205 currentTypeOrSubtype = options.types[currentTypeId];
173206 $( '#mw-wikilove-subtype' ).hide();
174207 $( '#mw-wikilove-subtype-label' ).hide();
 208+ $( '#mw-wikilove-image-preview' ).hide();
175209 $.wikiLove.updateAllDetails(); // update controls depending on this type
176210 }
177211
178212 $( '#mw-wikilove-add-details' ).show();
179213 $( '#mw-wikilove-preview' ).hide();
180 - previewData = null;
181214 }
182215 },
183216
@@ -184,6 +217,8 @@
185218 * Handler for changing the subtype.
186219 */
187220 changeSubtype: function() {
 221+ $.wikiLove.rememberInputData(); // remember previously entered data
 222+
188223 // find out which subtype is selected
189224 var newSubtypeId = $( '#mw-wikilove-subtype option:selected' ).first().data( 'subtypeId' );
190225 if( currentSubtypeId != newSubtypeId ) { // only change stuff when a different subtype is selected
@@ -191,18 +226,118 @@
192227 currentTypeOrSubtype = options.types[currentTypeId]
193228 .subtypes[currentSubtypeId];
194229 $( '#mw-wikilove-subtype-description' ).html( currentTypeOrSubtype.descr );
 230+
 231+ if( currentTypeOrSubtype.gallery === undefined && currentTypeOrSubtype.image ) { // not a gallery
 232+ $.wikiLove.showImagePreview();
 233+ } else {
 234+ $( '#mw-wikilove-image-preview' ).hide();
 235+ }
 236+
195237 $.wikiLove.updateAllDetails();
196238 $( '#mw-wikilove-preview' ).hide();
197 - previewData = null;
198239 }
199240 },
200241
201242 /*
 243+ * Remember data the user entered if it is different from the default.
 244+ */
 245+ rememberInputData: function() {
 246+ if ( rememberData === null) {
 247+ rememberData = {
 248+ header : '',
 249+ title : '',
 250+ message: '',
 251+ image : ''
 252+ };
 253+ }
 254+ if ( currentTypeOrSubtype !== null ) {
 255+ if ( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 &&
 256+ ( !currentTypeOrSubtype.header || $( '#mw-wikilove-header' ).val() != currentTypeOrSubtype.header ) )
 257+ {
 258+ rememberData.header = $( '#mw-wikilove-header' ).val();
 259+ }
 260+ if ( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 &&
 261+ ( !currentTypeOrSubtype.title || $( '#mw-wikilove-title' ).val() != currentTypeOrSubtype.title ) )
 262+ {
 263+ rememberData.title = $( '#mw-wikilove-title' ).val();
 264+ }
 265+ if ( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 &&
 266+ ( !currentTypeOrSubtype.message || $( '#mw-wikilove-message' ).val() != currentTypeOrSubtype.message ) )
 267+ {
 268+ rememberData.message = $( '#mw-wikilove-message' ).val();
 269+ }
 270+ if ( currentTypeOrSubtype.gallery === undefined && $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 &&
 271+ ( !currentTypeOrSubtype.image || $( '#mw-wikilove-image' ).val() != currentTypeOrSubtype.image ) )
 272+ {
 273+ rememberData.image = $( '#mw-wikilove-image' ).val();
 274+ }
 275+ }
 276+ },
 277+
 278+ /*
 279+ * Show a preview of the image for a subtype.
 280+ */
 281+ showImagePreview: function() {
 282+ $( '#mw-wikilove-image-preview' ).show();
 283+ $( '#mw-wikilove-image-preview-content' ).html( '' );
 284+ $( '#mw-wikilove-image-preview-spinner' ).fadeIn( 200 );
 285+ var title = $.wikiLove.addFilePrefix( currentTypeOrSubtype.image );
 286+ var loadingType = currentTypeOrSubtype;
 287+ $.ajax({
 288+ url: mw.util.wikiScript( 'api' ),
 289+ data: {
 290+ 'action' : 'query',
 291+ 'format' : 'json',
 292+ 'prop' : 'imageinfo',
 293+ 'iiprop' : 'mime|url',
 294+ 'titles' : title,
 295+ 'iiurlwidth' : 75,
 296+ 'iiurlheight' : 68
 297+ },
 298+ dataType: 'json',
 299+ type: 'POST',
 300+ success: function( data ) {
 301+ if ( !data || !data.query || !data.query.pages ) {
 302+ $( '#mw-wikilove-image-preview-spinner' ).fadeOut( 200 );
 303+ return;
 304+ }
 305+ if ( loadingType != currentTypeOrSubtype ) {
 306+ return;
 307+ }
 308+ $.each( data.query.pages, function( id, page ) {
 309+ if ( page.imageinfo && page.imageinfo.length ) {
 310+ // build an image tag with the correct url
 311+ var $img = $( '<img/>' )
 312+ .attr( 'src', page.imageinfo[0].thumburl )
 313+ .hide()
 314+ .load( function() {
 315+ $( '#mw-wikilove-image-preview-spinner' ).hide();
 316+ $( this ).css( 'display', 'inline-block' );
 317+ } );
 318+ $( '#mw-wikilove-image-preview-content' ).append( $img );
 319+ }
 320+ });
 321+ },
 322+ error: function() {
 323+ $( '#mw-wikilove-image-preview-spinner' ).fadeOut( 200 );
 324+ }
 325+ });
 326+ },
 327+
 328+ /*
202329 * Called when type or subtype changes, updates controls.
203330 */
204331 updateAllDetails: function() {
205332 $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove();
206333
 334+ // use remembered data for fields that can be set by the user
 335+ var currentRememberData = {
 336+ 'header' : ( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 ? rememberData.header : '' ),
 337+ 'title' : ( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 ? rememberData.title : '' ),
 338+ 'message': ( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 ? rememberData.message : '' ),
 339+ 'image' : ( $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 ? rememberData.image : '' )
 340+ };
 341+
207342 // only show the description if it exists for this type or subtype
208343 if( typeof currentTypeOrSubtype.descr == 'string' ) {
209344 $( '#mw-wikilove-subtype-description').show();
@@ -210,29 +345,29 @@
211346 $( '#mw-wikilove-subtype-description').hide();
212347 }
213348
214 - // show or hide header label and textbox depending on whether a predefined header exists
 349+ // show or hide header label and textbox depending on fields configuration
215350 $( '#mw-wikilove-header, #mw-wikilove-header-label' )
216351 .toggle( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 );
217352
218353 // set the new text for the header textbox
219 - $( '#mw-wikilove-header' ).val( currentTypeOrSubtype.header || '' );
 354+ $( '#mw-wikilove-header' ).val( currentRememberData.header || currentTypeOrSubtype.header || '' );
220355
221 - // show or hide title label and textbox depending on whether a predefined title exists
 356+ // show or hide title label and textbox depending on fields configuration
222357 $( '#mw-wikilove-title, #mw-wikilove-title-label')
223358 .toggle( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 );
224359
225360 // set the new text for the title textbox
226 - $( '#mw-wikilove-title' ).val( currentTypeOrSubtype.title || '' );
 361+ $( '#mw-wikilove-title' ).val( currentRememberData.title || currentTypeOrSubtype.title || '' );
227362
228 - // show or hide image label and textbox depending on whether a predefined image exists
229 - $( '#mw-wikilove-image, #mw-wikilove-image-label')
 363+ // show or hide image label and textbox depending on fields configuration
 364+ $( '#mw-wikilove-image, #mw-wikilove-image-label, #mw-wikilove-image-note, #mw-wikilove-commons-text' )
230365 .toggle( $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 );
231366
232367 // set the new text for the image textbox
233 - $( '#mw-wikilove-image' ).val( currentTypeOrSubtype.image || '' );
 368+ $( '#mw-wikilove-image' ).val( currentRememberData.image || currentTypeOrSubtype.image || '' );
234369
235370 if( typeof currentTypeOrSubtype.gallery == 'object'
236 - && currentTypeOrSubtype.gallery.imageList instanceof Array
 371+ && $.isArray( currentTypeOrSubtype.gallery.imageList )
237372 ) {
238373 $( '#mw-wikilove-gallery, #mw-wikilove-gallery-label' ).show();
239374 $.wikiLove.showGallery(); // build gallery from array of images
@@ -241,6 +376,13 @@
242377 $( '#mw-wikilove-gallery, #mw-wikilove-gallery-label' ).hide();
243378 }
244379
 380+ // show or hide message label and textbox depending on fields configuration
 381+ $( '#mw-wikilove-message, #mw-wikilove-message-label, #mw-wikilove-message-note' )
 382+ .toggle( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 );
 383+
 384+ // set the new text for the message textbox
 385+ $( '#mw-wikilove-message' ).val( currentRememberData.message || currentTypeOrSubtype.message || '' );
 386+
245387 if( $.inArray( 'notify', currentTypeOrSubtype.fields ) >= 0 && emailable ) {
246388 $( '#mw-wikilove-notify' ).show();
247389 } else {
@@ -250,61 +392,99 @@
251393 },
252394
253395 /*
254 - * Handler for clicking the preview button. Builds data for AJAX request.
 396+ * Handler for clicking the preview button.
255397 */
256 - submitPreview: function( e ) {
 398+ validatePreviewForm: function( e ) {
257399 e.preventDefault();
258400 $( '#mw-wikilove-preview' ).hide();
259401 $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove();
260402
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 - }
 403+ // Check for a header if it is required
 404+ if( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 && $( '#mw-wikilove-header' ).val().length === 0 ) {
 405+ $.wikiLove.showAddDetailsError( 'wikilove-err-header' ); return false;
269406 }
270 - if( $( '#mw-wikilove-header' ).val().length <= 0 ) {
271 - $.wikiLove.showError( 'wikilove-err-header' ); return false;
272 - }
273407
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;
 408+ // Check for a title if it is required, and otherwise use the header text
 409+ if( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 && $( '#mw-wikilove-title' ).val().length === 0 ) {
 410+ $( '#mw-wikilove-title' ).val( $( '#mw-wikilove-header' ).val() );
281411 }
282 - */
283412
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;
 413+ if( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 ) {
 414+ // If there's a signature already in the message, throw an error
 415+ if ( $( '#mw-wikilove-message' ).val().indexOf( '~~~' ) >= 0 ) {
 416+ $.wikiLove.showAddDetailsError( 'wikilove-err-sig' ); return false;
 417+ }
287418 }
288419
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 );
 420+ // Split image validation depending on whether or not it is a gallery
 421+ if ( typeof currentTypeOrSubtype.gallery == 'undefined' ) { // not a gallery
 422+ if ( $.inArray( 'image', currentTypeOrSubtype.fields ) >= 0 ) { // asks for an image
 423+ if ( $( '#mw-wikilove-image' ).val().length === 0 ) { // no image entered
 424+ // Give them the default image and continue with preview.
 425+ $( '#mw-wikilove-image' ).val( options.defaultImage );
 426+ $.wikiLove.submitPreview();
 427+ } else { // image was entered by user
 428+ // Make sure the image exists
 429+ var imageTitle = $.wikiLove.addFilePrefix( $( '#mw-wikilove-image' ).val() );
 430+ $( '#mw-wikilove-preview-spinner' ).fadeIn( 200 );
 431+
 432+ $.ajax( {
 433+ url: mw.util.wikiScript( 'api' ),
 434+ data: {
 435+ 'action': 'query',
 436+ 'format': 'json',
 437+ 'titles': imageTitle,
 438+ 'prop': 'imageinfo'
 439+ },
 440+ dataType: 'json',
 441+ success: function( data ) {
 442+ // See if image exists locally or through InstantCommons
 443+ if ( !data.query.pages[-1] || data.query.pages[-1].imageinfo) {
 444+ // Image exists
 445+ $.wikiLove.submitPreview();
 446+ $.wikiLove.logCustomImageUse( imageTitle, 1 );
 447+ } else {
 448+ // Image does not exist
 449+ $.wikiLove.showAddDetailsError( 'wikilove-err-image-bad' );
 450+ $.wikiLove.logCustomImageUse( imageTitle, 0 );
 451+ $( '#mw-wikilove-preview-spinner' ).fadeOut( 200 );
 452+ }
 453+ },
 454+ error: function() {
 455+ $.wikiLove.showAddDetailsError( 'wikilove-err-image-api' );
 456+ $( '#mw-wikilove-preview-spinner' ).fadeOut( 200 );
 457+ }
 458+ } );
 459+ }
 460+ } else { // doesn't ask for an image
 461+ $.wikiLove.submitPreview();
 462+ }
 463+ } else { // a gallery
 464+ if ( $( '#mw-wikilove-image' ).val().length === 0 ) { // no image selected
 465+ // Display an error telling them to select an image.
 466+ $.wikiLove.showAddDetailsError( 'wikilove-err-image' ); return false;
 467+ } else { // image was selected
 468+ $.wikiLove.submitPreview();
 469+ }
302470 }
303471 },
304472
305 - showError: function( errmsg ) {
 473+ /*
 474+ * After the form is validated, perform preview.
 475+ */
 476+ submitPreview: function() {
 477+ var text = $.wikiLove.prepareMsg( currentTypeOrSubtype.text || options.types[currentTypeId].text || options.defaultText );
 478+ $.wikiLove.doPreview( '==' + $( '#mw-wikilove-header' ).val() + "==\n" + text );
 479+ },
 480+
 481+ showAddDetailsError: function( errmsg ) {
306482 $( '#mw-wikilove-add-details' ).append( $( '<div class="mw-wikilove-error"></div>' ).text( mw.msg( errmsg ) ) );
307483 },
308484
 485+ showPreviewError: function( errmsg ) {
 486+ $( '#mw-wikilove-preview' ).append( $( '<div class="mw-wikilove-error"></div>' ).text( mw.msg( errmsg ) ) );
 487+ },
 488+
309489 /*
310490 * Prepares a message or e-mail body by replacing placeholders.
311491 * $1: message entered by the user
@@ -319,16 +499,47 @@
320500
321501 msg = msg.replace( '$1', $( '#mw-wikilove-message' ).val() ); // replace the raw message
322502 msg = msg.replace( '$2', $( '#mw-wikilove-title' ).val() ); // replace the title
323 - msg = msg.replace( '$3', $( '#mw-wikilove-image' ).val() ); // replace the image
 503+ var imageName = $.wikiLove.addFilePrefix( $( '#mw-wikilove-image' ).val() );
 504+ msg = msg.replace( '$3', imageName ); // replace the image
324505 msg = msg.replace( '$4', currentTypeOrSubtype.imageSize || options.defaultImageSize ); // replace the image size
325506 msg = msg.replace( '$5', currentTypeOrSubtype.backgroundColor || options.defaultBackgroundColor ); // replace the background color
326507 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
 508+ msg = msg.replace( '$7', '<nowiki>' + mw.config.get( 'wikilove-recipient' ) + '</nowiki>' ); // replace the username we're sending to
328509
329510 return msg;
330511 },
331512
332513 /*
 514+ * Adds a "File:" prefix if there isn't already a media namespace prefix.
 515+ */
 516+ addFilePrefix: function( filename ) {
 517+ // Can't use mw.Title in 1.17
 518+ var prefix = filename.split( ':' )[0] || '',
 519+ normalized = $.trim( prefix ).toLowerCase().replace( /\s/g, '_' );
 520+ // wgNamespaceIds is missing 'file' in 1.17 on non-English wikis
 521+ if ( mw.config.get( 'wgNamespaceIds' )[normalized] !== 6 && normalized !== 'file' ) {
 522+ filename = 'File:' + filename;
 523+ }
 524+ return filename;
 525+ },
 526+
 527+ /*
 528+ * Log each time a user attempts to use a custom image via the Make your own feature.
 529+ */
 530+ logCustomImageUse: function( imageTitle, success ) {
 531+ $.ajax( {
 532+ url: mw.util.wikiScript( 'api' ),
 533+ data: {
 534+ 'action': 'wikiloveimagelog',
 535+ 'image': imageTitle,
 536+ 'success': success,
 537+ 'format': 'json'
 538+ },
 539+ dataType: 'json'
 540+ } );
 541+ },
 542+
 543+ /*
333544 * Fires AJAX request for previewing wikitext.
334545 */
335546 doPreview: function( wikitext ) {
@@ -337,6 +548,7 @@
338549 url: mw.util.wikiScript( 'api' ),
339550 data: {
340551 'action': 'parse',
 552+ 'title': mw.config.get( 'wgPageName' ),
341553 'format': 'json',
342554 'text': wikitext,
343555 'prop': 'text',
@@ -347,6 +559,10 @@
348560 success: function( data ) {
349561 $.wikiLove.showPreview( data.parse.text['*'] );
350562 $( '#mw-wikilove-preview-spinner' ).fadeOut( 200 );
 563+ },
 564+ error: function() {
 565+ $.wikiLove.showAddDetailsError( 'wikilove-err-preview-api' );
 566+ $( '#mw-wikilove-preview-spinner' ).fadeOut( 200 );
351567 }
352568 });
353569 },
@@ -360,14 +576,46 @@
361577 },
362578
363579 /*
364 - * Handler for the send (final submit) button. Builds data for AJAX request.
 580+ * Handler for the send (final submit) button. Builds the data for the AJAX request.
365581 * The type sent for statistics is 'typeId-subtypeId' when using subtypes,
366582 * or simply 'typeId' otherwise.
367583 */
368584 submitSend: function( e ) {
369585 e.preventDefault();
370 - $.wikiLove.doSend( previewData.header, previewData.text,
371 - previewData.message, previewData.type, previewData.email );
 586+ $( '#mw-wikilove-dialog' ).find( '.mw-wikilove-error' ).remove();
 587+
 588+ // Check for a header if it is required
 589+ if( $.inArray( 'header', currentTypeOrSubtype.fields ) >= 0 && $( '#mw-wikilove-header' ).val().length === 0 ) {
 590+ $.wikiLove.showAddDetailsError( 'wikilove-err-header' ); return false;
 591+ }
 592+
 593+ // Check for a title if it is required, and otherwise use the header text
 594+ if( $.inArray( 'title', currentTypeOrSubtype.fields ) >= 0 && $( '#mw-wikilove-title' ).val().length === 0 ) {
 595+ $( '#mw-wikilove-title' ).val( $( '#mw-wikilove-header' ).val() );
 596+ }
 597+
 598+ if( $.inArray( 'message', currentTypeOrSubtype.fields ) >= 0 ) {
 599+ // If there's a signature already in the message, throw an error
 600+ if ( $( '#mw-wikilove-message' ).val().indexOf( '~~~' ) >= 0 ) {
 601+ $.wikiLove.showAddDetailsError( 'wikilove-err-sig' ); return false;
 602+ }
 603+ }
 604+
 605+ // We don't need to do any image validation here since its not actually possible to click
 606+ // Send WikiLove without having a valid image entered.
 607+
 608+ var submitData = {
 609+ 'header': $( '#mw-wikilove-header' ).val(),
 610+ 'text': $.wikiLove.prepareMsg( currentTypeOrSubtype.text || options.types[currentTypeId].text || options.defaultText ),
 611+ 'message': $( '#mw-wikilove-message' ).val(),
 612+ 'type': currentTypeId
 613+ + (currentSubtypeId !== null ? '-' + currentSubtypeId : '')
 614+ };
 615+ if ( $( '#mw-wikilove-notify-checkbox:checked' ).val() && emailable ) {
 616+ submitData.email = $.wikiLove.prepareMsg( currentTypeOrSubtype.email );
 617+ }
 618+ $.wikiLove.doSend( submitData.header, submitData.text,
 619+ submitData.message, submitData.type, submitData.email );
372620 },
373621
374622 /*
@@ -400,7 +648,7 @@
401649 $( '#mw-wikilove-send-spinner' ).fadeOut( 200 );
402650
403651 if ( typeof data.error !== 'undefined' ) {
404 - $( '#mw-wikilove-preview' ).append( '<div class="mw-wikilove-error">' + mw.html.escape( data.error.info ) + '<div>' );
 652+ $.wikiLove.showPreviewError( data.error.info );
405653 return;
406654 }
407655
@@ -410,12 +658,15 @@
411659 // jump to the correct section, because when we set the hash (#...)
412660 // the page won't reload...
413661 window.location.reload();
414 - }
415 - else {
416 - window.location = mw.util.wikiUrlencode(
417 - mw.config.get( 'wgArticlePath' ).replace( '$1', data.redirect.pageName )
 662+ } else {
 663+ window.location = encodeURI(
 664+ mw.config.get( 'wgArticlePath' ).replace( '$1', mw.util.wikiUrlencode( data.redirect.pageName ) )
418665 + '#' + data.redirect.fragment );
419666 }
 667+ },
 668+ error: function() {
 669+ $.wikiLove.showPreviewError( 'wikilove-err-send-api' );
 670+ $( '#mw-wikilove-send-spinner' ).fadeOut( 200 );
420671 }
421672 });
422673 },
@@ -439,11 +690,11 @@
440691 var titles = '';
441692 var imageList = currentTypeOrSubtype.gallery.imageList.slice( 0 );
442693 for( var i=0; i<currentTypeOrSubtype.gallery.number; i++ ) {
443 - // get a randomimage
 694+ // get a random image from imageList and add it to the list of titles to be retrieved
444695 var id = Math.floor( Math.random() * imageList.length );
445 - titles = titles + 'File:' + imageList[id] + '|';
 696+ titles = titles + $.wikiLove.addFilePrefix( imageList[id] ) + '|';
446697
447 - // remove the random page from the keys array
 698+ // remove the randomly selected image from imageList so that it can't be added twice
448699 imageList.splice(id, 1);
449700 }
450701
@@ -458,7 +709,8 @@
459710 'prop' : 'imageinfo',
460711 'iiprop' : 'mime|url',
461712 'titles' : titles,
462 - 'iiurlwidth' : currentTypeOrSubtype.gallery.width
 713+ 'iiurlwidth' : currentTypeOrSubtype.gallery.width,
 714+ 'iiurlheight' : currentTypeOrSubtype.gallery.height
463715 },
464716 dataType: 'json',
465717 type: 'POST',
@@ -472,18 +724,18 @@
473725 if ( loadingType != currentTypeOrSubtype ) {
474726 return;
475727 }
 728+ var galleryNumber = currentTypeOrSubtype.gallery.number;
476729
477730 $.each( data.query.pages, function( id, page ) {
478731 if ( page.imageinfo && page.imageinfo.length ) {
479 - // build an image tag with the correct url and width
 732+ // build an image tag with the correct url
480733 var $img = $( '<img/>' )
481734 .attr( 'src', page.imageinfo[0].thumburl )
482 - .attr( 'width', currentTypeOrSubtype.gallery.width )
483735 .hide()
484736 .load( function() {
485737 $( this ).css( 'display', 'inline-block' );
486738 loadingIndex++;
487 - if ( loadingIndex >= currentTypeOrSubtype.gallery.number ) {
 739+ if ( loadingIndex >= galleryNumber ) {
488740 $( '#mw-wikilove-gallery-spinner' ).fadeOut( 200 );
489741 }
490742 } );
@@ -502,6 +754,8 @@
503755 index++;
504756 }
505757 } );
 758+ // Pre-select first image
 759+ /* $('#mw-wikilove-gallery-img-0 img').trigger('click'); */
506760 },
507761 error: function() {
508762 $( '#mw-wikilove-gallery-error' ).show();
@@ -514,10 +768,13 @@
515769 * Init function which is called upon page load. Binds the WikiLove icon to opening the dialog.
516770 */
517771 init: function() {
518 - options = $.wikiLove.optionsHook();
519 - $( '#ca-wikilove' ).find( 'a' ).click( function( e ) {
 772+ options = $.wikiLoveOptions;
 773+
 774+ var $wikiLoveLink = $( '#ca-wikilove' ).find( 'a' );
 775+ $wikiLoveLink.unbind( 'click' );
 776+ $wikiLoveLink.click( function( e ) {
 777+ e.preventDefault();
520778 $.wikiLove.openDialog();
521 - e.preventDefault();
522779 });
523780 }
524781
@@ -604,7 +861,7 @@
605862 }
606863 }
607864 }
608 - if( gallery.length <= 0 ) {
 865+ if( gallery.length === 0 ) {
609866 $( '#mw-wikilove-gallery' ).hide();
610867 $( '#mw-wikilove-gallery-label' ).hide();
611868 }
@@ -616,5 +873,6 @@
617874 */
618875 };
619876
620 -}());
 877+
 878+$( document ).ready( $.wikiLove.init );
621879 } ) ( jQuery );
Index: branches/wmf/1.17wmf1/extensions/WikiLove/ApiWikiLove.php
@@ -0,0 +1,179 @@
 2+<?php
 3+class ApiWikiLove 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+ // not using section => 'new' here, as we like to give our own edit summary
 24+ $api = new ApiMain( new FauxRequest( array(
 25+ 'action' => 'edit',
 26+ 'title' => $talk->getFullText(),
 27+ // need to do this, as Article::replaceSection fails for non-existing pages
 28+ 'appendtext' => ( $talk->exists() ? "\n\n" : '' ) . wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
 29+ . "\n\n" . $params['text'],
 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+ $api->execute();
 36+
 37+ if ( isset( $params['email'] ) ) {
 38+ $this->emailUser( $talk, $params['subject'], $params['email'], $params['token'] );
 39+ }
 40+
 41+ $this->getResult()->addValue( 'redirect', 'pageName', $talk->getPrefixedDBkey() );
 42+ $this->getResult()->addValue( 'redirect', 'fragment', Title::escapeFragmentForURL( $params['subject'] ) );
 43+ // note that we cannot use Title::makeTitle here as it doesn't sanitize the fragment
 44+ }
 45+
 46+ /**
 47+ * @param $talk Title
 48+ * @param $subject
 49+ * @param $message
 50+ * @param $type
 51+ * @param $email
 52+ * @return void
 53+ */
 54+ private function saveInDb( $talk, $subject, $message, $type, $email ) {
 55+ global $wgUser;
 56+ $dbw = wfGetDB( DB_MASTER );
 57+ $receiver = User::newFromName( $talk->getSubjectPage()->getBaseText() );
 58+ if ( $receiver === false || $receiver->isAnon() ) {
 59+ $this->setWarning( 'Not logging anonymous recipients' );
 60+ return;
 61+ }
 62+
 63+ $values = array(
 64+ 'wll_timestamp' => $dbw->timestamp(),
 65+ 'wll_sender' => $wgUser->getId(),
 66+ 'wll_sender_editcount' => $wgUser->getEditCount(),
 67+ 'wll_sender_registration' => $wgUser->getRegistration(),
 68+ 'wll_receiver' => $receiver->getId(),
 69+ 'wll_receiver_editcount' => $receiver->getEditCount(),
 70+ 'wll_receiver_registration' => $receiver->getRegistration(),
 71+ 'wll_type' => $type,
 72+ 'wll_subject' => $subject,
 73+ 'wll_message' => $message,
 74+ 'wll_email' => $email,
 75+ );
 76+
 77+ try{
 78+ $dbw->insert( 'wikilove_log', $values, __METHOD__ );
 79+ } catch( DBQueryError $dbqe ) {
 80+ $this->setWarning( 'Action was not logged' );
 81+ }
 82+ }
 83+
 84+ /**
 85+ * @param $talk Title
 86+ * @param $subject string
 87+ * @param $text string
 88+ * @param $token string
 89+ */
 90+ private function emailUser( $talk, $subject, $text, $token ) {
 91+ global $wgRequest;
 92+ $api = new ApiMain( new FauxRequest( array(
 93+ 'action' => 'emailuser',
 94+ 'target' => User::newFromName( $talk->getSubjectPage()->getBaseText() )->getName(),
 95+ 'subject' => $subject,
 96+ 'text' => $text,
 97+ 'token' => $token,
 98+ ), false, array( 'wsEditToken' => $wgRequest->getSessionData( 'wsEditToken' ) ) ), true );
 99+ try{
 100+ $api->execute();
 101+ } catch( DBQueryError $dbqe ) {
 102+ $this->setWarning( 'E-mail was not sent' );
 103+ }
 104+ }
 105+
 106+ public function getAllowedParams() {
 107+ return array(
 108+ 'title' => array(
 109+ ApiBase::PARAM_TYPE => 'string',
 110+ ApiBase::PARAM_REQUIRED => true,
 111+ ),
 112+ 'text' => array(
 113+ ApiBase::PARAM_TYPE => 'string',
 114+ ApiBase::PARAM_REQUIRED => true,
 115+ ),
 116+ 'message' => array(
 117+ ApiBase::PARAM_TYPE => 'string',
 118+ ),
 119+ 'token' => array(
 120+ ApiBase::PARAM_TYPE => 'string',
 121+ ApiBase::PARAM_REQUIRED => true,
 122+ ),
 123+ 'subject' => array(
 124+ ApiBase::PARAM_TYPE => 'string',
 125+ ApiBase::PARAM_REQUIRED => true,
 126+ ),
 127+ 'type' => array(
 128+ ApiBase::PARAM_TYPE => 'string',
 129+ ),
 130+ 'email' => array(
 131+ ApiBase::PARAM_TYPE => 'string',
 132+ ),
 133+ );
 134+ }
 135+
 136+ public function getParamDescription() {
 137+ return array(
 138+ 'title' => 'Title of the user or user talk page to send WikiLove to',
 139+ 'text' => 'Raw wikitext to add in the new section',
 140+ 'message' => 'Actual message the user has entered, for logging purposes',
 141+ 'token' => 'Edit token. You can get one of these through prop=info',
 142+ 'subject' => 'Subject header of the new section',
 143+ 'email' => 'Content of the optional e-mail message to send to the user',
 144+ 'type' => array( 'Type of WikiLove (for statistics); this corresponds with a type',
 145+ 'selected in the left menu, and optionally a subtype after that',
 146+ '(e.g. "barnstar-normal" or "kitten")',
 147+ ),
 148+ );
 149+ }
 150+
 151+ public function getDescription() {
 152+ return array(
 153+ 'Give WikiLove to another user.',
 154+ "WikiLove is a positive message posted to a user's talk page through a",
 155+ 'convenient interface with preset or locally defined templates. This action',
 156+ 'adds the specified wikitext to a certain talk page. For statistical purposes,',
 157+ 'the type and other data are logged.',
 158+ );
 159+ }
 160+
 161+ public function getPossibleErrors() {
 162+ return array_merge( parent::getPossibleErrors(), array(
 163+ array( 'invalidtitle', 'title' ),
 164+ array(
 165+ 'code' => 'nologging',
 166+ 'info' => 'Warning: action was not logged!'
 167+ ),
 168+ ) );
 169+ }
 170+
 171+ public function getExamples() {
 172+ return array(
 173+ 'api.php?action=wikilove&title=User:Dummy&text=Love&subject=Hi&token=%2B\\',
 174+ );
 175+ }
 176+
 177+ public function getVersion() {
 178+ return __CLASS__ . ': $Id$';
 179+ }
 180+}
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/ApiWikiLove.php
___________________________________________________________________
Added: svn:eol-style
1181 + native
Added: svn:keywords
2182 + Id
Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.i18n.php
@@ -15,20 +15,22 @@
1616 'wikilove-desc' => 'Adds an interface for facilitating positive user feedback to user talk pages',
1717 'wikilove' => 'WikiLove',
1818 'wikilove-enable-preference' => 'Enable showing appreciation for other users with the WikiLove tab (experimental)',
19 - 'wikilove-tab-text' => 'Show appreciation',
 19+ 'wikilove-tab-text' => 'WikiLove',
2020 'tooltip-ca-wikilove' => 'Post a message for this user showing your appreciation',
21 - 'wikilove-dialog-title' => 'WikiLove',
 21+ 'wikilove-dialog-title' => 'WikiLove – Send a message of appreciation to another user',
2222 'wikilove-select-type' => 'Select type',
2323 'wikilove-get-started-header' => "Let's get started!",
2424 'wikilove-get-started-list-1' => 'Select the type of WikiLove you wish to send',
2525 'wikilove-get-started-list-2' => 'Add details to your WikiLove',
2626 'wikilove-get-started-list-3' => 'Send your WikiLove!',
2727 'wikilove-add-details' => 'Add details',
28 - 'wikilove-image' => 'Image:',
29 - 'wikilove-header' => 'Header:',
30 - 'wikilove-title' => 'Title:',
 28+ 'wikilove-image' => 'Enter an image filename:',
 29+ 'wikilove-select-image' => 'Select an image:',
 30+ 'wikilove-header' => 'Enter a header:',
 31+ 'wikilove-title' => 'Enter an award title:',
3132 'wikilove-enter-message' => 'Enter a message:',
3233 'wikilove-omit-sig' => '(without a signature)',
 34+ 'wikilove-image-example' => '(example: Trophy.png)',
3335 'wikilove-button-preview' => 'Preview',
3436 'wikilove-preview' => 'Preview',
3537 'wikilove-notify' => 'Notify the user by e-mail',
@@ -38,19 +40,30 @@
3941 'wikilove-err-title' => 'Please enter a title.',
4042 'wikilove-err-msg' => 'Please enter a message.',
4143 'wikilove-err-image' => 'Please select an image.',
 44+ 'wikilove-err-image-bad' => 'Image does not exist.',
 45+ 'wikilove-err-image-api' => 'Something went wrong when retrieving the image. Please try again.',
4246 'wikilove-err-sig' => 'Please do not include a signature in the message.',
43 - 'wikilove-err-gallery' => 'Something went wrong when loading the images!',
 47+ 'wikilove-err-gallery' => 'Something went wrong when loading the images.',
4448 'wikilove-err-gallery-again' => 'Try again',
45 - 'wikilove-summary' => '/* $1 */ new WikiLove message'
 49+ 'wikilove-err-preview-api' => 'Something went wrong during previewing. Please try again.',
 50+ 'wikilove-err-send-api' => 'Something went wrong when sending the message. Please try again.',
 51+ 'wikilove-summary' => '/* $1 */ new WikiLove message',
 52+ 'wikilove-what-is-this' => "What is this?",
 53+ 'wikilove-anon-warning' => 'Note: This user is not registered, he or she may not notice this message.',
 54+ 'wikilove-commons-text' => 'You can find images by browsing $1.',
 55+ 'wikilove-commons-link' => 'Wikimedia Commons',
 56+ 'wikilove-commons-url' => 'http://commons.wikimedia.org',
4657 );
4758
4859 /** Message documentation (Message documentation)
4960 * @author McDutchie
5061 */
5162 $messages['qqq'] = array(
 63+ 'wikilove-image-example' => 'The filename should be an actual image on Wikimedia Commons.',
5264 'wikilove-button-preview' => 'Button text. Verb.',
5365 'wikilove-preview' => 'Title. Noun.',
54 - 'wikilove-barnstar-header' => 'See [[:wikipedia:Barnstar]]. Probably not literally translatable.',
 66+ 'wikilove-commons-text' => '$1 gets replaced by a link with wikilove-commons-link as caption and wikilove-commons-url as URL.',
 67+ 'wikilove-commons-url' => 'This URL can be changed to point at a localised page on Wikimedia Commons.',
5568 );
5669
5770 /** Bulgarian (Български)
@@ -58,50 +71,133 @@
5972 */
6073 $messages['bg'] = array(
6174 'wikilove' => 'УикиОбич',
62 - 'wikilove-dialog-title' => 'УикиОбич',
 75+ 'wikilove-tab-text' => 'УикиОбич',
 76+ 'wikilove-dialog-title' => 'УикиОбич - Изпращане на благодарствено съобщение на друг потребител',
 77+ 'wikilove-add-details' => 'Добавяне на подробности',
 78+ 'wikilove-select-image' => 'Избиране на изображение:',
6379 'wikilove-omit-sig' => '(без подпис)',
 80+ 'wikilove-image-example' => '(пример: Trophy.png)',
6481 'wikilove-button-preview' => 'Предварителен преглед',
6582 'wikilove-preview' => 'Предварителен преглед',
 83+ 'wikilove-notify' => 'Уведомяване на потребителя на електронната поща',
6684 'wikilove-button-send' => 'Изпращане на УикиОбич',
 85+ 'wikilove-err-image-bad' => 'Изображението не съществува.',
 86+ 'wikilove-err-sig' => 'В съобщението не трябва да се вклчва подпис.',
 87+ 'wikilove-err-gallery' => 'Възникна грешка при зареждане на изображенията!',
6788 'wikilove-err-gallery-again' => 'Опитайте отново',
 89+ 'wikilove-summary' => '/* $1 */ ново съобщение за УикиОбич',
 90+ 'wikilove-what-is-this' => 'Какво е това?',
6891 );
6992
 93+/** Breton (Brezhoneg)
 94+ * @author Fulup
 95+ */
 96+$messages['br'] = array(
 97+ 'wikilove-desc' => 'Ouzhpennañ a ra un etrefas evit aesaat merkañ evezhiadennoù pozitivel war pajenn gaozeal un implijer',
 98+ 'wikilove' => 'WikiLove',
 99+ 'wikilove-enable-preference' => 'Aotren a ra diskouez priziadennoù evit implijerien all gant an ivinell WikiLove (arnodel)',
 100+ 'wikilove-tab-text' => 'WikiLove',
 101+ 'tooltip-ca-wikilove' => 'Lakaat ur gemennadenn evit an implijer-mañ da ziskouez e priziit an traoù',
 102+ 'wikilove-dialog-title' => "WikiLove – Kas ur gemennadenn pe ur soñj bennak d'un implijer all",
 103+ 'wikilove-select-type' => 'Diuzañ ur seurt',
 104+ 'wikilove-get-started-header' => 'Krogomp ganti !',
 105+ 'wikilove-get-started-list-1' => "Diuzit ar seurt WikiLove hoc'h eus c'hoant da gas",
 106+ 'wikilove-get-started-list-2' => "Ouzhpennit titouroù d'ho WikiLove",
 107+ 'wikilove-get-started-list-3' => 'Kasit ho WikiLove !',
 108+ 'wikilove-add-details' => 'Ouzhpennañ titouroù',
 109+ 'wikilove-image' => 'Lakat ur skeudenn eus Wikimedia Commons :',
 110+ 'wikilove-select-image' => 'Diuzañ ur skeudenn :',
 111+ 'wikilove-header' => 'Lakaat un talbenn :',
 112+ 'wikilove-title' => 'Lakaat un titl :',
 113+ 'wikilove-enter-message' => 'Lakaat ur gemennadenn',
 114+ 'wikilove-omit-sig' => '(hep sinadur)',
 115+ 'wikilove-button-preview' => 'Rakwelet',
 116+ 'wikilove-preview' => 'Rakwelet',
 117+ 'wikilove-notify' => "Kas ur c'hemenn dre bostel d'an implijer",
 118+ 'wikilove-button-send' => 'Kas ar WikiLove',
 119+ 'wikilove-type-makeyourown' => "Krouit ho-hini deoc'h-c'hwi",
 120+ 'wikilove-err-header' => 'Merkit un talbenn.',
 121+ 'wikilove-err-title' => 'Merkit un titl.',
 122+ 'wikilove-err-msg' => 'Merkit ur gemennadenn.',
 123+ 'wikilove-err-image' => 'Diuzit ur skeudenn.',
 124+ 'wikilove-err-sig' => 'Arabat sinañ ar gemennadenn.',
 125+ 'wikilove-err-gallery' => "Un dra bennak a-dreuz zo c'hoarvezet en ur gargañ ar skeudennoù !",
 126+ 'wikilove-err-gallery-again' => 'Klask en-dro',
 127+ 'wikilove-summary' => '/* $1 */ kemennadenn WikiLove nevez',
 128+);
 129+
 130+/** Bosnian (Bosanski)
 131+ * @author CERminator
 132+ */
 133+$messages['bs'] = array(
 134+ 'wikilove-select-type' => 'Odaberite vrstu',
 135+ 'wikilove-add-details' => 'Dodaj detalje',
 136+ 'wikilove-enter-message' => 'Unesite poruku:',
 137+ 'wikilove-button-preview' => 'Pregled',
 138+ 'wikilove-preview' => 'Pregled',
 139+);
 140+
70141 /** German (Deutsch)
71142 * @author Kghbln
72143 */
73144 $messages['de'] = array(
74145 'wikilove-desc' => 'Ergänzt ein Hilfsmittel zum Ausdrücken persönlicher Wertschätzung gegenüber einem Benutzer auf dessen Diskussionsseite',
75 - 'wikilove' => 'Wikiliebe',
 146+ 'wikilove' => 'Wertschätzung',
76147 'wikilove-enable-preference' => 'Menüreiter für das Hilfsmittel zum Ausdrücken persönlicher Wertschätzung gegenüber einem anderen Benutzer aktivieren (experimentell)',
77148 'wikilove-tab-text' => 'Wertschätzen',
78149 'tooltip-ca-wikilove' => 'Diesem Benutzer die persönliche Wertschätzung in Form einer Nachricht hinterlassen',
79 - 'wikilove-dialog-title' => 'Persönliche Wertschätzung',
 150+ 'wikilove-dialog-title' => 'Eine Nachricht der Wertschätzung an einen anderen Benutzer senden',
80151 'wikilove-select-type' => 'Art auswählen',
81152 'wikilove-get-started-header' => 'Los geht’s!',
82153 'wikilove-get-started-list-1' => 'Die Art der persönlichen Wertschätzung auswählen, die ausgedrückt werden soll',
83154 'wikilove-get-started-list-2' => 'Persönliche Wertschätzung ergänzen',
84155 'wikilove-get-started-list-3' => 'Persönliche Wertschätzung senden',
85156 '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:',
 157+ 'wikilove-image' => 'Gib den Namen der Bilddatei an:',
 158+ 'wikilove-select-image' => 'Wähle ein Bild aus:',
 159+ 'wikilove-header' => 'Gib den Inhalt des Kopfbereichs ein:',
 160+ 'wikilove-title' => 'Gib den Titel für die Wertschätzung ein:',
 161+ 'wikilove-enter-message' => 'Gibt eine Nachricht ein:',
90162 'wikilove-omit-sig' => '(ohne Signatur)',
 163+ 'wikilove-image-example' => '(Beispiel: Drei Sonnenblumen im Feld.JPG)',
91164 'wikilove-button-preview' => 'Vorschau',
92165 'wikilove-preview' => 'Vorschau',
93166 'wikilove-notify' => 'Den Benutzer per E-Mail benachrichtigen',
94167 'wikilove-button-send' => 'Persönliche Wertschätzung senden',
95168 'wikilove-type-makeyourown' => 'Eigene Art der Wertschätzung erstellen',
96 - 'wikilove-err-header' => 'Bitte einen Kopfbereich eingeben.',
 169+ 'wikilove-err-header' => 'Bitte den Inhalt für den Kopfbereich eingeben.',
97170 'wikilove-err-title' => 'Bitte einen Titel eingeben.',
98171 'wikilove-err-msg' => 'Bitte eine Nachricht eingeben.',
99172 'wikilove-err-image' => 'Bitte ein Bild auswählen.',
 173+ 'wikilove-err-image-bad' => 'Das Bild ist nicht vorhanden.',
 174+ 'wikilove-err-image-api' => 'Während des Abrufens des Bildes ist ein Fehler aufgetreten. Bitte versuche es erneut.',
100175 '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',
 176+ 'wikilove-err-gallery' => 'Während des Ladens der Bilder ist ein Fehler aufgetreten.',
 177+ 'wikilove-err-gallery-again' => 'Bitte versuche es erneut.',
 178+ 'wikilove-err-preview-api' => 'Während der Vorschau ist ein Fehler aufgetreten. Bitte versuche es erneut.',
 179+ 'wikilove-err-send-api' => 'Während des Sendens der Wertschätzung ist ein Fehler aufgetreten. Bitte versuche es erneut.',
103180 'wikilove-summary' => '/* $1 */ neue persönliche Wertschätzung',
 181+ 'wikilove-what-is-this' => 'Worum handelt es sich?',
 182+ 'wikilove-anon-warning' => 'Hinweis: Es handelt sich um einen Benutzer ohne Benutzerkonto. Daher wird er oder sie die Nachricht wahrscheinlich nicht bemerken.',
 183+ 'wikilove-commons-text' => 'Bilder können gefunden werden, indem man $1 durchsucht.',
104184 );
105185
 186+/** German (formal address) (‪Deutsch (Sie-Form)‬)
 187+ * @author Kghbln
 188+ */
 189+$messages['de-formal'] = array(
 190+ 'wikilove-image' => 'Geben Sie den Namen der Bilddatei an:',
 191+ 'wikilove-select-image' => 'Wählen Sie ein Bild aus:',
 192+ 'wikilove-header' => 'Geben Sie den Inhalt des Kopfbereichs ein:',
 193+ 'wikilove-title' => 'Geben Sie den Titel für die Wertschätzung ein:',
 194+ 'wikilove-enter-message' => 'Geben Sie eine Nachricht ein:',
 195+ 'wikilove-err-image-api' => 'Während des Abrufens des Bildes ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.',
 196+ 'wikilove-err-gallery' => 'Während des Ladens der Bilder ist ein Fehler aufgetreten.',
 197+ 'wikilove-err-gallery-again' => 'Bitte versuchen Sie es erneut.',
 198+ 'wikilove-err-preview-api' => 'Während der Vorschau ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.',
 199+ 'wikilove-err-send-api' => 'Während des Sendens der Wertschätzung ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.',
 200+);
 201+
106202 /** French (Français)
107203 * @author Crochet.david
108204 * @author IAlex
@@ -123,7 +219,7 @@
124220 'wikilove-add-details' => 'Ajouter des détails',
125221 'wikilove-image' => 'Image :',
126222 'wikilove-header' => 'En-tête :',
127 - 'wikilove-title' => 'Titre :',
 223+ 'wikilove-title' => 'Entrez un titre :',
128224 'wikilove-enter-message' => 'Entrez un message :',
129225 'wikilove-omit-sig' => '(sans signature)',
130226 'wikilove-button-preview' => 'Prévisualiser',
@@ -138,6 +234,7 @@
139235 'wikilove-err-sig' => "S'il vous plaît ne pas inclure une signature dans le message.",
140236 'wikilove-err-gallery' => "Quelque chose n'a pas fonctionné lors du chargement des images !",
141237 'wikilove-err-gallery-again' => 'Essayez à nouveau',
 238+ 'wikilove-summary' => '/* $1 */ nouveau message WikiLove',
142239 );
143240
144241 /** Franco-Provençal (Arpetan)
@@ -178,18 +275,19 @@
179276 'wikilove-desc' => 'Engade unha interface para facilitar a mostra de aprecio cara a un usuario na súa páxina de conversa',
180277 'wikilove' => 'Amor wiki',
181278 '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',
 279+ 'wikilove-tab-text' => 'Amor wiki',
183280 'tooltip-ca-wikilove' => 'Déixelle unha mensaxe a este usuario mostrando o seu aprecio',
184 - 'wikilove-dialog-title' => 'Amor wiki',
 281+ 'wikilove-dialog-title' => 'Amor wiki - Envíe unha mensaxe de aprecio a outro usuario',
185282 'wikilove-select-type' => 'Seleccione o tipo',
186283 'wikilove-get-started-header' => 'Comecemos!',
187284 'wikilove-get-started-list-1' => 'Seleccione tipo de amor wiki que queira enviar',
188285 'wikilove-get-started-list-2' => 'Engadir detalles ao seu amor wiki',
189286 'wikilove-get-started-list-3' => 'Enviar o seu amor wiki!',
190287 'wikilove-add-details' => 'Engadir detalles',
191 - 'wikilove-image' => 'Imaxe:',
192 - 'wikilove-header' => 'Cabeceira:',
193 - 'wikilove-title' => 'Título:',
 288+ 'wikilove-image' => 'Insira unha imaxe da Wikimedia Commons:',
 289+ 'wikilove-select-image' => 'Seleccione unha imaxe:',
 290+ 'wikilove-header' => 'Insira unha cabeceira:',
 291+ 'wikilove-title' => 'Insira un título:',
194292 'wikilove-enter-message' => 'Escriba unha mensaxe:',
195293 'wikilove-omit-sig' => '(sen sinatura)',
196294 'wikilove-button-preview' => 'Vista previa',
@@ -205,6 +303,7 @@
206304 'wikilove-err-gallery' => 'Houbo un problema ao cargar as imaxes!',
207305 'wikilove-err-gallery-again' => 'Inténteo de novo',
208306 'wikilove-summary' => '/* $1 */ nova mensaxe de amor wiki',
 307+ 'wikilove-what-is-this' => 'Que é isto?',
209308 );
210309
211310 /** Hebrew (עברית)
@@ -214,16 +313,17 @@
215314 'wikilove-desc' => 'הוספת ממשק לשליחת תגובות חיוביות לדפי שיחת משתמש',
216315 'wikilove' => 'ויקי־אהבה',
217316 'wikilove-enable-preference' => 'הפעלה של הצגת הערכה למשתמשים אחרים באמצעות לשונית ויקי־אהבה (ניסיוני)',
218 - 'wikilove-tab-text' => 'להראות הערכה',
 317+ 'wikilove-tab-text' => 'ויקי־אהבה',
219318 'tooltip-ca-wikilove' => 'לשלוח למשתמש הזה הודעה שמראה את הערכתך',
220 - 'wikilove-dialog-title' => 'ויקי־אהבה',
 319+ 'wikilove-dialog-title' => 'ויקי־אהבה – שליחת הודעת הערכה למשתמש אחר',
221320 'wikilove-select-type' => 'בחירת סוג',
222321 'wikilove-get-started-header' => 'בואו נתחיל!',
223322 'wikilove-get-started-list-1' => 'איזה סוג של ויקי‏־אהבה לשלוח',
224323 'wikilove-get-started-list-2' => 'להוסיף פרטים להודעת ויקי־‏אהבה',
225324 'wikilove-get-started-list-3' => 'לשלוח ויקי־אהבה!',
226325 'wikilove-add-details' => 'הוספת פרטים',
227 - 'wikilove-image' => 'תמונה:',
 326+ 'wikilove-image' => 'שם קובץ תמונה:',
 327+ 'wikilove-select-image' => 'בחירת תמונה:',
228328 'wikilove-header' => 'כותרת פסקה:',
229329 'wikilove-title' => 'שם הצל"ש:',
230330 'wikilove-enter-message' => 'הודעה:',
@@ -238,6 +338,10 @@
239339 'wikilove-err-msg' => 'נא להזין הודעה.',
240340 'wikilove-err-image' => 'נא לבחור תמונה.',
241341 'wikilove-err-sig' => 'נא לא לכתוב חתימה בהודעה.',
 342+ 'wikilove-err-gallery' => 'משהו השתבש בעת טעינת התמונות!',
 343+ 'wikilove-err-gallery-again' => 'לנסות שוב',
 344+ 'wikilove-summary' => '/* $1 */ הודעת ויקי־אהבה חדשה',
 345+ 'wikilove-what-is-this' => 'מה זה?',
242346 );
243347
244348 /** Hungarian (Magyar)
@@ -245,17 +349,22 @@
246350 */
247351 $messages['hu'] = array(
248352 'wikilove' => 'Wikibók',
249 - 'wikilove-dialog-title' => 'Wikibók',
 353+ 'wikilove-tab-text' => 'Wikibók',
 354+ 'tooltip-ca-wikilove' => 'Elismerő üzenet küldése ennek a felhasználónak',
 355+ 'wikilove-dialog-title' => 'Wikibók – Küldj elismerő üzenetet egy másik felhasználónak',
250356 'wikilove-select-type' => 'Válassz típust',
 357+ 'wikilove-get-started-header' => 'Kezdjük!',
251358 'wikilove-get-started-list-1' => 'Válaszd ki a wikibók típusát',
252359 'wikilove-get-started-list-2' => 'Töltsd ki a részleteket',
253360 'wikilove-get-started-list-3' => 'Küldd el a wikibókot!',
254361 'wikilove-add-details' => 'Részletek',
255 - 'wikilove-image' => 'Kép:',
256 - 'wikilove-header' => 'Fejléc:',
 362+ 'wikilove-image' => 'Képfájl a Wikimédia Commonsról:',
 363+ 'wikilove-select-image' => 'Válassz egy képet:',
 364+ 'wikilove-header' => 'A fejléc tartalma:',
257365 'wikilove-title' => 'Cím:',
258366 'wikilove-enter-message' => 'Üzenet:',
259367 'wikilove-omit-sig' => '(aláírás nélkül)',
 368+ 'wikilove-image-example' => '(példa: Trophy.png)',
260369 'wikilove-button-preview' => 'Előnézet',
261370 'wikilove-preview' => 'Előnézet',
262371 'wikilove-notify' => 'Felhasználó értesítése e-mailben',
@@ -265,9 +374,13 @@
266375 'wikilove-err-title' => 'Add meg a címet!',
267376 'wikilove-err-msg' => 'Add meg az üzenetet!',
268377 'wikilove-err-image' => 'Válassz egy képet!',
 378+ 'wikilove-err-image-bad' => 'A kép nem létezik.',
 379+ 'wikilove-err-image-api' => 'Képellenőrzés sikertelen.',
269380 'wikilove-err-sig' => 'Ne helyezz el aláírást az üzenetben!',
270381 'wikilove-err-gallery' => 'Valami hiba történt a képek betöltése közben!',
271382 'wikilove-err-gallery-again' => 'Újrapróbálkozás',
 383+ 'wikilove-summary' => '/* $1 */ Új wikibók',
 384+ 'wikilove-what-is-this' => 'Mi ez?',
272385 );
273386
274387 /** Interlingua (Interlingua)
@@ -277,20 +390,22 @@
278391 'wikilove-desc' => 'Adde un interfacie pro exprimer appreciation in le paginas de discussion de usatores',
279392 'wikilove' => 'WikiLove',
280393 'wikilove-enable-preference' => 'Permitter monstrar appreciation pro altere usatores con le scheda WikiLove (experimental)',
281 - 'wikilove-tab-text' => 'Monstrar appreciation',
 394+ 'wikilove-tab-text' => 'WikiLove',
282395 'tooltip-ca-wikilove' => 'Publicar un message pro iste usator que monstra tu appreciation',
283 - 'wikilove-dialog-title' => 'WikiLove',
 396+ 'wikilove-dialog-title' => 'WikiLove: Inviar un message de appreciation a un altere usator',
284397 'wikilove-select-type' => 'Selige typo',
285398 'wikilove-get-started-header' => 'Nos comencia!',
286399 'wikilove-get-started-list-1' => 'Selige le typo de WikiLove que tu vole inviar',
287400 'wikilove-get-started-list-2' => 'Adde detalios a tu WikiLove',
288401 'wikilove-get-started-list-3' => 'Invia tu WikiLove!',
289402 'wikilove-add-details' => 'Adder detalios',
290 - 'wikilove-image' => 'Imagine:',
291 - 'wikilove-header' => 'Capite:',
292 - 'wikilove-title' => 'Titulo:',
 403+ 'wikilove-image' => 'Entra le nomine de file de un imagine:',
 404+ 'wikilove-select-image' => 'Selige un imagine:',
 405+ 'wikilove-header' => 'Entra un texto de capite:',
 406+ 'wikilove-title' => 'Entra le titulo de un premio:',
293407 'wikilove-enter-message' => 'Entra un message:',
294408 'wikilove-omit-sig' => '(sin signatura)',
 409+ 'wikilove-image-example' => '(exemplo: Stella-Auro-Interlingua.jpg)',
295410 'wikilove-button-preview' => 'Previsualisar',
296411 'wikilove-preview' => 'Previsualisation',
297412 'wikilove-notify' => 'Notificar le usator per e-mail',
@@ -300,9 +415,19 @@
301416 'wikilove-err-title' => 'Per favor entra un titulo.',
302417 'wikilove-err-msg' => 'Per favor entra un message.',
303418 'wikilove-err-image' => 'Per favor selige un imagine.',
 419+ 'wikilove-err-image-bad' => 'Le imagine non existe.',
 420+ 'wikilove-err-image-api' => 'Un problema occurreva durante le obtention del imagine. Per favor reproba.',
304421 'wikilove-err-sig' => 'Per favor non include un signatura in le message.',
305422 'wikilove-err-gallery' => 'Un problema occurreva durante le cargamento del imagines!',
306423 'wikilove-err-gallery-again' => 'Reprobar',
 424+ 'wikilove-err-preview-api' => 'Un problema occurreva durante le previsualisation. Per favor reproba.',
 425+ 'wikilove-err-send-api' => 'Un problema occurreva durante le invio del message. Per favor reproba.',
 426+ 'wikilove-summary' => '/* $1 */ nove message de WikiLove',
 427+ 'wikilove-what-is-this' => 'Que es isto?',
 428+ 'wikilove-anon-warning' => 'Nota: Iste usator non es registrate, e ille o illa non recipera notification de iste message.',
 429+ 'wikilove-commons-text' => 'Tu pote trovar imagines in $1.',
 430+ 'wikilove-commons-link' => 'Wikimedia Commons',
 431+ 'wikilove-commons-url' => 'http://commons.wikimedia.org/wiki/Pagina_principal?uselang=ia',
307432 );
308433
309434 /** Colognian (Ripoarisch)
@@ -339,12 +464,17 @@
340465 'wikilove-dialog-title' => 'WikiLove',
341466 'wikilove-get-started-header' => 'Elo geet et lass!',
342467 'wikilove-add-details' => 'Detailer derbäisetzen',
343 - 'wikilove-image' => 'Bild:',
344 - 'wikilove-title' => 'Titel:',
 468+ 'wikilove-image' => 'Gitt e Bild un:',
 469+ 'wikilove-select-image' => 'Sicht e Bild eraus:',
 470+ 'wikilove-title' => 'Gitt en Titel un:',
 471+ 'wikilove-enter-message' => 'Gitt e Message an:',
 472+ 'wikilove-omit-sig' => '(ouni Ënnerschrëft)',
345473 'wikilove-button-preview' => 'Kucken ouni ofzespäicheren',
346474 'wikilove-preview' => 'Kucken ouni ofzespäicheren',
 475+ 'wikilove-notify' => 'De Benotzer per Mail informéieren',
 476+ 'wikilove-type-makeyourown' => 'Maacht Ären Eegenen',
347477 'wikilove-err-image' => 'Sicht w.e.g. e Bild eraus.',
348 - 'wikilove-barnstar-header' => 'Een Uerde fir Iech!',
 478+ 'wikilove-err-gallery-again' => 'Probéiert nach emol',
349479 );
350480
351481 /** Macedonian (Македонски)
@@ -354,20 +484,22 @@
355485 'wikilove-desc' => 'Додава посредник за искажување на позитивни мислења и поддршка на кориснички страници за разговор',
356486 'wikilove' => 'ВикиЉубов',
357487 'wikilove-enable-preference' => 'Овозможи оддавање на признанија и заслуги со јазичето ВикиЉубов (експериментално)',
358 - 'wikilove-tab-text' => 'Оддај признание',
 488+ 'wikilove-tab-text' => 'ВикиЉубов',
359489 'tooltip-ca-wikilove' => 'Оставете му порака на корисников кажувајќи му дека го цените',
360 - 'wikilove-dialog-title' => 'ВикиЉубов',
 490+ 'wikilove-dialog-title' => 'ВикиЉубов - испратете порака на корисник, оддавајќи му признание за работата',
361491 'wikilove-select-type' => 'Одберете тип',
362492 'wikilove-get-started-header' => 'Да почнеме!',
363493 'wikilove-get-started-list-1' => 'Одберете го типот на ВикиЉубов што сакате да ја испратите',
364494 'wikilove-get-started-list-2' => 'Внесете содржина на ВикиЉубов-та',
365495 'wikilove-get-started-list-3' => 'Испратете ја вашата ВикиЉубов',
366496 'wikilove-add-details' => 'Внесете содржина',
367 - 'wikilove-image' => 'Слика:',
368 - 'wikilove-header' => 'Заглавие:',
369 - 'wikilove-title' => 'Наслов:',
 497+ 'wikilove-image' => 'Внесете име на слика:',
 498+ 'wikilove-select-image' => 'Одберете слика:',
 499+ 'wikilove-header' => 'Внесете заглавие:',
 500+ 'wikilove-title' => 'Внесете назив на наградата:',
370501 'wikilove-enter-message' => 'Внесете порака:',
371502 'wikilove-omit-sig' => '(без потпис)',
 503+ 'wikilove-image-example' => '(пример: Trophy.png)',
372504 'wikilove-button-preview' => 'Преглед',
373505 'wikilove-preview' => 'Преглед',
374506 'wikilove-notify' => 'Извести го корисникот по е-пошта',
@@ -377,32 +509,79 @@
378510 'wikilove-err-title' => 'Внесете наслов.',
379511 'wikilove-err-msg' => 'Внесете порака.',
380512 'wikilove-err-image' => 'Одберете слика.',
 513+ 'wikilove-err-image-bad' => 'Сликата не постои.',
 514+ 'wikilove-err-image-api' => 'Се појави проблем при преземањето на сликата. Обидете се повторно.',
381515 'wikilove-err-sig' => 'Не ставајте потпис во пораката.',
382516 'wikilove-err-gallery' => 'Се појави грешка при вчитувањето на сликите!',
383517 'wikilove-err-gallery-again' => 'Обиди се повторно',
 518+ 'wikilove-err-preview-api' => 'Се појави проблем при прегледувањето. Обидете се повторно.',
 519+ 'wikilove-err-send-api' => 'Се појави проблем при испраќањето на пораката. Обидете се повторно.',
384520 'wikilove-summary' => '/* $1 */ нова порака (ВикиЉубов)',
 521+ 'wikilove-what-is-this' => 'Што е ова?',
 522+ 'wikilove-anon-warning' => 'Напомена: Корисникот не е регистриран, па затоа може да не ја примети поракава.',
 523+ 'wikilove-commons-text' => 'Слики можете да најдете во проектот $1.',
385524 );
386525
 526+/** Malayalam (മലയാളം)
 527+ * @author Praveenp
 528+ */
 529+$messages['ml'] = array(
 530+ 'wikilove-desc' => 'ഉപയോക്താക്കൾക്ക് സംവാദം താളുകൾ വഴി ഗുണാത്മക അഭിപ്രായങ്ങൾ പ്രകടിപ്പിക്കാനുള്ള സമ്പർക്കമുഖം കൂട്ടിച്ചേർക്കുന്നു',
 531+ 'wikilove' => 'വിക്കിലവ്',
 532+ 'wikilove-enable-preference' => 'വിക്കിലവ് റ്റാബ് ഉപയോഗിച്ച് മറ്റ് ഉപയോക്താക്കളെ അഭിനന്ദനങ്ങൾ അറിയിക്കൽ സജ്ജമാക്കുക (പരീക്ഷണാടിസ്ഥാനം)',
 533+ 'wikilove-tab-text' => 'വിക്കിലവ്',
 534+ 'tooltip-ca-wikilove' => 'താങ്കളുടെ അഭിനന്ദനം അറിയിക്കാൻ ഈ ഉപയോക്താവിന് ഒരു സന്ദേശയമയ്ക്കുക',
 535+ 'wikilove-dialog-title' => 'വിക്കിലവ് - മറ്റൊരു ഉപയോക്താവിനെ അഭിനന്ദനം അറിയിക്കാനൊരു സന്ദേശം നൽകുക',
 536+ 'wikilove-select-type' => 'ഇനം തിരഞ്ഞെടുക്കുക',
 537+ 'wikilove-get-started-header' => 'നമുക്ക് തുടങ്ങാം!',
 538+ 'wikilove-get-started-list-1' => 'താങ്കൾ അയയ്ക്കാനാഗ്രഹിക്കുന്ന തരം വിക്കിലവ് തിരഞ്ഞെടുക്കുക',
 539+ 'wikilove-get-started-list-2' => 'താങ്കളുടെ വിക്കിലവിലേയ്ക്ക് കൂടുതൽ വിവരങ്ങൾ കൂട്ടിച്ചേർക്കുക',
 540+ 'wikilove-get-started-list-3' => 'താങ്കളുടെ വിക്കിലവ് അയയ്ക്കുക!',
 541+ 'wikilove-add-details' => 'അധികവിവരങ്ങൾ ചേർക്കുക',
 542+ 'wikilove-image' => 'വിക്കിമീഡിയ കോമൺസിൽ നിന്നുമുള്ള ഒരു ചിത്രം നൽകുക:',
 543+ 'wikilove-select-image' => 'ചിത്രം തിരഞ്ഞെടുക്കുക:',
 544+ 'wikilove-header' => 'തലക്കുറി നൽകുക:',
 545+ 'wikilove-title' => 'തലക്കെട്ട് നൽകുക:',
 546+ 'wikilove-enter-message' => 'സന്ദേശം നൽകുക:',
 547+ 'wikilove-omit-sig' => '(ഒപ്പ് ചേർക്കേണ്ടതില്ല)',
 548+ 'wikilove-button-preview' => 'എങ്ങനെയുണ്ടെന്നു കാണുക',
 549+ 'wikilove-preview' => 'എങ്ങനെയുണ്ടെന്നു കാണുക',
 550+ 'wikilove-notify' => 'ഉപയോക്താവിനെ ഇമെയിൽ വഴി അറിയിക്കുക',
 551+ 'wikilove-button-send' => 'വിക്കിലവ് അയയ്ക്കുക',
 552+ 'wikilove-type-makeyourown' => 'താങ്കളുടെ സ്വന്തമായ ഒരെണ്ണം സൃഷ്ടിക്കുക',
 553+ 'wikilove-err-header' => 'ദയവായി ഒരു തലക്കുറി ചേർക്കുക.',
 554+ 'wikilove-err-title' => 'ദയവായി തലക്കെട്ട് നൽകുക.',
 555+ 'wikilove-err-msg' => 'ദയവായി ഒരു സന്ദേശം ചേർക്കുക.',
 556+ 'wikilove-err-image' => 'ദയവായി ചിത്രം തിരഞ്ഞെടുക്കുക.',
 557+ 'wikilove-err-sig' => 'ദയവായി സന്ദേശത്തിൽ ഒപ്പ് ഉൾപ്പെടുത്തരുത്.',
 558+ 'wikilove-err-gallery' => 'ചിത്രങ്ങൾ ശേഖരിച്ചുകൊണ്ടിരിക്കെ എന്തോ കുഴപ്പമുണ്ടായി!',
 559+ 'wikilove-err-gallery-again' => 'വീണ്ടും ശ്രമിക്കുക',
 560+ 'wikilove-summary' => '/* $1 */ പുതിയ വിക്കിലവ് സന്ദേശം',
 561+ 'wikilove-what-is-this' => 'എന്താണിത്?',
 562+);
 563+
387564 /** Dutch (Nederlands)
388565 * @author SPQRobin
389566 * @author Siebrand
 567+ * @author Tjcool007
390568 */
391569 $messages['nl'] = array(
392570 'wikilove-desc' => "Voegt een interface toe voor het geven van positieve terugkoppeling op overlegpagina's van gebruikers",
393571 'wikilove' => 'Wikiwaardering',
394572 'wikilove-enable-preference' => 'Waardering geven aan andere gebruikers via Wikiwaardering inschakelen (experimenteel)',
395 - 'wikilove-tab-text' => 'Waardering tonen',
 573+ 'wikilove-tab-text' => 'Wikiwaardering',
396574 'tooltip-ca-wikilove' => 'Plaats een bericht voor deze gebruiker om uw waardering te tonen',
397 - 'wikilove-dialog-title' => 'Wikiwaardering',
 575+ 'wikilove-dialog-title' => 'Wikiwaardering - stuur een boodschap van waardering naar een andere gebruiker',
398576 'wikilove-select-type' => 'Selecteer type',
399577 'wikilove-get-started-header' => 'Begin ermee!',
400578 'wikilove-get-started-list-1' => 'Selecteer het type Wikiwaardering dat u wilt achterlaten',
401579 'wikilove-get-started-list-2' => 'Voegt gegevens toe aan uw Wikiwaardering',
402580 'wikilove-get-started-list-3' => 'Uw Wikiwaardering verzenden!',
403581 'wikilove-add-details' => 'Gegevens toevoegen',
404 - 'wikilove-image' => 'Afbeelding:',
405 - 'wikilove-header' => 'Koptekst:',
406 - 'wikilove-title' => 'Onderwerp:',
 582+ 'wikilove-image' => 'Geef de bestandsnaam van een afbeelding op:',
 583+ 'wikilove-select-image' => 'Kies een afbeelding',
 584+ 'wikilove-header' => 'Geef een koptekst op:',
 585+ 'wikilove-title' => 'Geef een onderwerp op:',
407586 'wikilove-enter-message' => 'Voer een bericht in:',
408587 'wikilove-omit-sig' => '(zonder ondertekening)',
409588 'wikilove-button-preview' => 'Voorvertoning',
@@ -414,11 +593,21 @@
415594 'wikilove-err-title' => 'Geef een naam op.',
416595 'wikilove-err-msg' => 'Geef een bericht op.',
417596 'wikilove-err-image' => 'Selecteer een afbeelding.',
 597+ 'wikilove-err-image-bad' => 'Afbeelding bestaat niet.',
418598 'wikilove-err-sig' => 'Neem geen ondertekening op in dit bericht.',
419599 'wikilove-err-gallery' => 'Er iets misgegaan bij het laden van de afbeeldingen.',
420600 'wikilove-err-gallery-again' => 'Probeer het opnieuw',
 601+ 'wikilove-summary' => '/* $1 */ nieuw Wikiwaarderingbericht',
421602 );
422603
 604+/** Pashto (پښتو)
 605+ * @author Ahmed-Najib-Biabani-Ibrahimkhel
 606+ */
 607+$messages['ps'] = array(
 608+ 'wikilove-image' => 'انځور:',
 609+ 'wikilove-title' => 'سرليک:',
 610+);
 611+
423612 /** Portuguese (Português)
424613 * @author Hamilton Abreu
425614 */
@@ -426,20 +615,22 @@
427616 'wikilove-desc' => 'Adiciona uma interface para facilitar a colocação de demonstrações de apreço nas páginas de discussão dos utilizadores',
428617 'wikilove' => 'WikiApreço',
429618 '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',
 619+ 'wikilove-tab-text' => 'WikiApreço',
431620 'tooltip-ca-wikilove' => 'Envie uma mensagem a este utilizador demonstrando o seu apreço',
432 - 'wikilove-dialog-title' => 'WikiApreço',
 621+ 'wikilove-dialog-title' => 'WikiApreço - Envie uma mensagem de apreço a outro utilizador',
433622 'wikilove-select-type' => 'Escolha o tipo',
434623 'wikilove-get-started-header' => 'Vamos começar!',
435624 'wikilove-get-started-list-1' => 'Escolha o tipo de WikiApreço que pretende enviar',
436625 'wikilove-get-started-list-2' => 'Acrescente detalhes ao seu WikiApreço',
437626 'wikilove-get-started-list-3' => 'Enviar o seu WikiApreço!',
438627 'wikilove-add-details' => 'Adicionar detalhes',
439 - 'wikilove-image' => 'Imagem:',
440 - 'wikilove-header' => 'Cabeçalho:',
441 - 'wikilove-title' => 'Título:',
 628+ 'wikilove-image' => 'Introduza o nome de uma imagem:',
 629+ 'wikilove-select-image' => 'Seleccione uma imagem:',
 630+ 'wikilove-header' => 'Introduza um cabeçalho:',
 631+ 'wikilove-title' => 'Introduza o título de um prémio:',
442632 'wikilove-enter-message' => 'Introduza uma mensagem:',
443633 'wikilove-omit-sig' => '(sem assinatura)',
 634+ 'wikilove-image-example' => '(exemplo: Troféu.png)',
444635 'wikilove-button-preview' => 'Antever',
445636 'wikilove-preview' => 'Antevisão',
446637 'wikilove-notify' => 'Notificar o utilizador por correio electrónico',
@@ -449,18 +640,124 @@
450641 'wikilove-err-title' => 'Introduza um título, por favor.',
451642 'wikilove-err-msg' => 'Introduza uma mensagem, por favor.',
452643 'wikilove-err-image' => 'Escolha uma imagem, por favor.',
 644+ 'wikilove-err-image-bad' => 'A imagem não existe.',
 645+ 'wikilove-err-image-api' => 'Ocorreu um erro ao aceder à imagem. Tente novamente, por favor.',
453646 'wikilove-err-sig' => 'Não inclua uma assinatura na mensagem, por favor.',
454647 'wikilove-err-gallery' => 'Ocorreu um erro ao carregar as imagens!',
455648 'wikilove-err-gallery-again' => 'Tente novamente',
 649+ 'wikilove-err-preview-api' => 'Ocorreu um erro durante a antevisão. Tente novamente, por favor.',
 650+ 'wikilove-err-send-api' => 'Ocorreu um erro ao enviar a mensagem. Tente novamente, por favor.',
456651 'wikilove-summary' => '/* $1 */ nova mensagem de WikiApreço',
 652+ 'wikilove-what-is-this' => 'O que é isto?',
 653+ 'wikilove-anon-warning' => 'Nota: Este utilizador não está registado e poderá não se aperceber desta mensagem.',
 654+ 'wikilove-commons-text' => 'Pode encontrar imagens pesquisando-as em $1.',
457655 );
458656
 657+/** Tarandíne (Tarandíne)
 658+ * @author Joetaras
 659+ */
 660+$messages['roa-tara'] = array(
 661+ 'wikilove-err-gallery-again' => 'Pruève arrete',
 662+);
 663+
 664+/** Russian (Русский)
 665+ * @author Александр Сигачёв
 666+ */
 667+$messages['ru'] = array(
 668+ 'wikilove-desc' => 'Добавляет интерфейс для упрощения добавления положительных отзывов на страницы обсуждения участников',
 669+ 'wikilove' => 'ВикиСимпатия',
 670+ 'wikilove-enable-preference' => 'Включить вкладку ВикиСимпатия для выражения признательности другим пользователям (экспериментальная)',
 671+ 'wikilove-tab-text' => 'ВикиСимпатия',
 672+ 'tooltip-ca-wikilove' => 'Отправить сообщение для этого участника, выразить ему признательность',
 673+ 'wikilove-dialog-title' => 'ВикиСимпатия — выразите признательность другому участнику',
 674+ 'wikilove-select-type' => 'Выберите тип',
 675+ 'wikilove-get-started-header' => 'Давайте начнём!',
 676+ 'wikilove-get-started-list-1' => 'Выберите тип ВикиСимпатии, которую вы хотите выразить',
 677+ 'wikilove-get-started-list-2' => 'Добавьте подробности к вашей ВикиСимпатии',
 678+ 'wikilove-get-started-list-3' => 'Отправьте вашу ВикиСимпатию!',
 679+ 'wikilove-add-details' => 'Добавить подробности',
 680+ 'wikilove-image' => 'Введите имя файла с изображением:',
 681+ 'wikilove-select-image' => 'Выберите изображение:',
 682+ 'wikilove-header' => 'Введите заголовок:',
 683+ 'wikilove-title' => 'Введите название награды:',
 684+ 'wikilove-enter-message' => 'Введите сообщение:',
 685+ 'wikilove-omit-sig' => '(без подписи)',
 686+ 'wikilove-image-example' => '(например: Trophy.png)',
 687+ 'wikilove-button-preview' => 'Предпросмотр',
 688+ 'wikilove-preview' => 'Предпросмотр',
 689+ 'wikilove-notify' => 'Уведомить участника по электронной почте',
 690+ 'wikilove-button-send' => 'Отправить ВикиСимпатию',
 691+ 'wikilove-type-makeyourown' => 'Сделать свой собственный',
 692+ 'wikilove-err-header' => 'Пожалуйста, введите заголовок.',
 693+ 'wikilove-err-title' => 'Пожалуйста, введите название.',
 694+ 'wikilove-err-msg' => 'Пожалуйста, введите сообщение.',
 695+ 'wikilove-err-image' => 'Пожалуйста, выберите изображение.',
 696+ 'wikilove-err-image-bad' => 'Нет такого изображения.',
 697+ 'wikilove-err-image-api' => 'Что-то пошло не так, при получении изображения. Пожалуйста, попробуйте ещё раз.',
 698+ 'wikilove-err-sig' => 'Пожалуйста, не включайте подпись в сообщение.',
 699+ 'wikilove-err-gallery' => 'Что-то пошло не так при загрузке изображений!',
 700+ 'wikilove-err-gallery-again' => 'Попробуйте ещё раз',
 701+ 'wikilove-err-preview-api' => 'Что-то пошло не так во время предпросмотра. Пожалуйста, попробуйте ещё раз.',
 702+ 'wikilove-err-send-api' => 'Что-то пошло не так при отправке сообщения. Пожалуйста, попробуйте ещё раз.',
 703+ 'wikilove-summary' => '/ * $1 * / новая ВикиСимпатия',
 704+ 'wikilove-what-is-this' => 'Что это?',
 705+ 'wikilove-anon-warning' => 'Примечание. Этот участник не зарегистрирован, он или она может не заметить это сообщение.',
 706+ 'wikilove-commons-text' => 'Вы можете найти изображения в проекте $1.',
 707+ 'wikilove-commons-link' => 'Викисклад',
 708+ 'wikilove-commons-url' => 'http://commons.wikimedia.org/wiki/Main_Page?uselang=ru',
 709+);
 710+
 711+/** Slovenian (Slovenščina)
 712+ * @author Dbc334
 713+ */
 714+$messages['sl'] = array(
 715+ 'wikilove-desc' => 'Doda vmesnik za olajšanje pozitivne povratne informacije uporabnika na uporabniških pogovornih straneh',
 716+ 'wikilove' => 'WikiLjubezen',
 717+ 'wikilove-enable-preference' => 'Omogoči izkazovanje hvaležnosti drugim uporabnikom z zavihkom WikiLjubezen (preizkusno)',
 718+ 'wikilove-tab-text' => 'WikiLjubezen',
 719+ 'tooltip-ca-wikilove' => 'Objavite sporočilo za tega uporabnika, s katerim boste izkazali svojo hvaležnost',
 720+ 'wikilove-dialog-title' => 'WikiLjubezen – Pošljite drugemu uporabniku sporočilo hvaležnosti',
 721+ 'wikilove-select-type' => 'Izberite vrsto',
 722+ 'wikilove-get-started-header' => 'Začnimo!',
 723+ 'wikilove-get-started-list-1' => 'Izberite vrsto WikiLjubezni, ki jo želite poslati',
 724+ 'wikilove-get-started-list-2' => 'Dodajte podrobnosti svoji WikiLjubezni',
 725+ 'wikilove-get-started-list-3' => 'Pošljite svojo WikiLjubezen!',
 726+ 'wikilove-add-details' => 'Dodaj podrobnosti',
 727+ 'wikilove-image' => 'Vnesite ime datoteke slike:',
 728+ 'wikilove-select-image' => 'Izberite sliko:',
 729+ 'wikilove-header' => 'Vnesite glavo:',
 730+ 'wikilove-title' => 'Vnesite naslov nagrade:',
 731+ 'wikilove-enter-message' => 'Vnesite sporočilo:',
 732+ 'wikilove-omit-sig' => '(brez podpisa)',
 733+ 'wikilove-image-example' => '(primer: Trophy.png)',
 734+ 'wikilove-button-preview' => 'Predoglej',
 735+ 'wikilove-preview' => 'Predogled',
 736+ 'wikilove-notify' => 'Obvesti uporabnika po e-pošti',
 737+ 'wikilove-button-send' => 'Pošljite WikiLjubezen',
 738+ 'wikilove-type-makeyourown' => 'Naredite svojo',
 739+ 'wikilove-err-header' => 'Prosimo, vnesite glavo.',
 740+ 'wikilove-err-title' => 'Prosimo, vnesite naslov.',
 741+ 'wikilove-err-msg' => 'Prosimo, vnesite sporočilo.',
 742+ 'wikilove-err-image' => 'Prosimo, izberite sliko.',
 743+ 'wikilove-err-image-bad' => 'Slika ne obstaja.',
 744+ 'wikilove-err-image-api' => 'Med pridobivanjem slike je nekaj šlo narobe. Prosimo, poskusite znova.',
 745+ 'wikilove-err-sig' => 'Prosimo, da v sporočilo ne vključite svojega podpisa.',
 746+ 'wikilove-err-gallery' => 'Nekaj je šlo narobe pri nalaganju slik!',
 747+ 'wikilove-err-gallery-again' => 'Poskusite znova',
 748+ 'wikilove-err-preview-api' => 'Med predogledom je nekaj šlo narobe. Prosimo, poskusite znova.',
 749+ 'wikilove-err-send-api' => 'Med pošiljanjem sporočila je nekaj šlo narobe. Prosimo, poskusite znova.',
 750+ 'wikilove-summary' => '/* $1 */ novo sporočilo WikiLjubezen',
 751+ 'wikilove-what-is-this' => 'Kaj je to?',
 752+ 'wikilove-anon-warning' => 'Opomba: Uporabnik ni registriran, zato sporočila morda ne bo opazil.',
 753+ 'wikilove-commons-text' => 'Slike lahko najdete z brskanjem po $1.',
 754+);
 755+
459756 /** Telugu (తెలుగు)
460757 * @author Veeven
461758 */
462759 $messages['te'] = array(
463760 'wikilove-add-details' => 'వివరాలను చేర్చు',
464 - 'wikilove-title' => 'శీర్షిక:',
 761+ 'wikilove-title' => 'ఒక శీర్షికను ఇవ్వండి:',
465762 );
466763
467764 /** Tagalog (Tagalog)
@@ -488,3 +785,86 @@
489786 'wikilove-type-makeyourown' => 'Gumawa ng sarili mo',
490787 );
491788
 789+/** Vietnamese (Tiếng Việt)
 790+ * @author Minh Nguyen
 791+ */
 792+$messages['vi'] = array(
 793+ 'wikilove-desc' => 'Thêm một giao diện cho phép gửi phản hồi khen ngợi cho người dùng khác qua các trang thảo luận cá nhân',
 794+ 'wikilove' => 'WikiLove',
 795+ 'wikilove-enable-preference' => 'Cho phép bày tỏ sự biết ơn cho người dùng khác qua thẻ WikiLove (thử nghiệm)',
 796+ 'wikilove-tab-text' => 'WikiLove',
 797+ 'tooltip-ca-wikilove' => 'Đăng một thông điệp cho người dùng này để cho biết sự đánh giá cao của bạn',
 798+ 'wikilove-dialog-title' => 'WikiLove – Gửi thông điệp bày tỏ sự đánh giá cao cho người dùng khác',
 799+ 'wikilove-select-type' => 'Chọn loại',
 800+ 'wikilove-get-started-header' => 'Hãy bắt đầu!',
 801+ 'wikilove-get-started-list-1' => 'Chọn loại WikiLove để gửi',
 802+ 'wikilove-get-started-list-2' => 'Thêm chi tiết vào WikiLove của bạn',
 803+ 'wikilove-get-started-list-3' => 'Gửi WikiLove!',
 804+ 'wikilove-add-details' => 'Thêm chi tiết',
 805+ 'wikilove-image' => 'Nhập một tên hình:',
 806+ 'wikilove-select-image' => 'Chọn một hình ảnh:',
 807+ 'wikilove-header' => 'Nhập đầu đề:',
 808+ 'wikilove-title' => 'Nhập một tên giải thưởng:',
 809+ 'wikilove-enter-message' => 'Nhập tin nhắn:',
 810+ 'wikilove-omit-sig' => '(không ký tên)',
 811+ 'wikilove-image-example' => '(ví dụ: Trophy.png)',
 812+ 'wikilove-button-preview' => 'Xem trước',
 813+ 'wikilove-preview' => 'Xem trước',
 814+ 'wikilove-notify' => 'Báo người dùng qua thư điện tử',
 815+ 'wikilove-button-send' => 'Gửi WikiLove',
 816+ 'wikilove-type-makeyourown' => 'Làm lấy',
 817+ 'wikilove-err-header' => 'Vui lòng đưa vào đầu đề.',
 818+ 'wikilove-err-title' => 'Vui lòng đưa vào tựa đề.',
 819+ 'wikilove-err-msg' => 'Vui lòng đưa vào tin nhắn.',
 820+ 'wikilove-err-image' => 'Vui lòng chọn một hình ảnh.',
 821+ 'wikilove-err-image-bad' => 'Hình không tồn tại.',
 822+ 'wikilove-err-image-api' => 'Đã gặp một lỗi bất ngờ trong việc lấy hình ảnh. Hãy thử lại.',
 823+ 'wikilove-err-sig' => 'Xin vui lòng đừng đưa một chữ ký vào tin nhắn.',
 824+ 'wikilove-err-gallery' => 'Đã gặp lỗi khi tải các hình ảnh!',
 825+ 'wikilove-err-gallery-again' => 'Thử lại',
 826+ 'wikilove-err-preview-api' => 'Đã gặp một lỗi bất ngờ trong việc xem trước. Hãy thử lại.',
 827+ 'wikilove-err-send-api' => 'Đã gặp một lỗi bất ngờ trong việc gửi thông điệp. Hãy thử lại.',
 828+ 'wikilove-summary' => '/* $1 */ thông điệp WikiLove mới',
 829+ 'wikilove-what-is-this' => 'Này là gì?',
 830+ 'wikilove-anon-warning' => 'Lưu ý: Người dùng này chưa đăng ký, nên họ có thể không nhận thấy được thông điệp này.',
 831+ 'wikilove-commons-text' => 'Có thể tìm kiếm hình ảnh tại $1.',
 832+);
 833+
 834+/** Traditional Chinese (‪中文(繁體)‬)
 835+ * @author Waihorace
 836+ */
 837+$messages['zh-hant'] = array(
 838+ 'wikilove-desc' => '加入一個界面以使用戶向其他用戶提供正面的意見',
 839+ 'wikilove' => '維基友愛',
 840+ 'wikilove-enable-preference' => '顯示維基友愛標籤以便讚賞其他用戶(試驗性)',
 841+ 'wikilove-tab-text' => '維基友愛',
 842+ 'tooltip-ca-wikilove' => '張貼一條信息以表示你的欣賞',
 843+ 'wikilove-dialog-title' => '維基友愛-向其他用戶發送欣賞信息',
 844+ 'wikilove-select-type' => '選擇類型',
 845+ 'wikilove-get-started-header' => '開始吧!',
 846+ 'wikilove-get-started-list-1' => '選擇想發送的維基友愛類型',
 847+ 'wikilove-get-started-list-2' => '對你的維基友愛加入細節',
 848+ 'wikilove-get-started-list-3' => '發送你的友愛!',
 849+ 'wikilove-add-details' => '加入詳情',
 850+ 'wikilove-image' => '輸入一個來自維基共享資源的圖像名:',
 851+ 'wikilove-select-image' => '選擇一個圖片:',
 852+ 'wikilove-header' => '輸入頭部:',
 853+ 'wikilove-title' => '輸入標題:',
 854+ 'wikilove-enter-message' => '輸入信息:',
 855+ 'wikilove-omit-sig' => '(沒有簽名)',
 856+ 'wikilove-button-preview' => '預覽',
 857+ 'wikilove-preview' => '預覽',
 858+ 'wikilove-notify' => '通過電郵通知這位用戶',
 859+ 'wikilove-button-send' => '發送友愛',
 860+ 'wikilove-type-makeyourown' => '製作你自己的',
 861+ 'wikilove-err-header' => '請輸入頭部。',
 862+ 'wikilove-err-title' => '請輸入標題。',
 863+ 'wikilove-err-msg' => '請輸入信息。',
 864+ 'wikilove-err-image' => '請選擇圖片。',
 865+ 'wikilove-err-sig' => '請不要在信息中包含簽名。',
 866+ 'wikilove-err-gallery' => '加載圖片時發生了錯誤。',
 867+ 'wikilove-err-gallery-again' => '再試一次',
 868+ 'wikilove-summary' => '/* $1 */ 新的維基友愛信息',
 869+ 'wikilove-what-is-this' => '這是甚麼?',
 870+);
 871+
Index: branches/wmf/1.17wmf1/extensions/WikiLove/ApiWikiLoveImageLog.php
@@ -0,0 +1,64 @@
 2+<?php
 3+
 4+/**
 5+ * This API is for logging each time a user attempts to use a custom image via the Make your own
 6+ * feature. This is basically just to see if users can grok the concept. Once usage analysis is
 7+ * complete, this API can be deleted.
 8+ */
 9+class ApiWikiLoveImageLog extends ApiBase {
 10+ public function execute() {
 11+ global $wgRequest, $wgWikiLoveLogging, $wgParser;
 12+
 13+ $params = $this->extractRequestParams();
 14+
 15+ if ( $wgWikiLoveLogging ) {
 16+ $this->saveInDb( $params['image'], $params['success'] );
 17+ }
 18+ }
 19+
 20+ /**
 21+ * @param $user User ID
 22+ * @param $image string
 23+ * @param $success integer
 24+ */
 25+ private function saveInDb( $image, $success ) {
 26+ global $wgUser;
 27+ $dbw = wfGetDB( DB_MASTER );
 28+
 29+ $values = array(
 30+ 'wlil_timestamp' => $dbw->timestamp(),
 31+ 'wlil_user_id' => $wgUser->getId(),
 32+ 'wlil_image' => $image,
 33+ 'wlil_success' => $success,
 34+ );
 35+
 36+ try{
 37+ $dbw->insert( 'wikilove_image_log', $values, __METHOD__ );
 38+ } catch( DBQueryError $dbqe ) {
 39+ $this->setWarning( 'Action was not logged' );
 40+ }
 41+ }
 42+
 43+ public function getDescription() {
 44+ return array(
 45+ 'This API is for logging each time a user attempts to use a custom image via WikiLove.',
 46+ );
 47+ }
 48+
 49+ public function getAllowedParams() {
 50+ return array(
 51+ 'image' => array(
 52+ ApiBase::PARAM_TYPE => 'string',
 53+ ApiBase::PARAM_REQUIRED => true,
 54+ ),
 55+ 'success' => array(
 56+ ApiBase::PARAM_TYPE => 'integer',
 57+ ApiBase::PARAM_REQUIRED => true,
 58+ )
 59+ );
 60+ }
 61+
 62+ public function getVersion() {
 63+ return __CLASS__ . ': $Id$';
 64+ }
 65+}
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove/ApiWikiLoveImageLog.php
___________________________________________________________________
Added: svn:eol-style
166 + native
Added: svn:keywords
267 + Id

Status & tagging log