r111577 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111576‎ | r111577 | r111578 >
Date:20:32, 15 February 2012
Author:wikinaut
Status:deferred (Comments)
Tags:
Comment:
bug fixed: marker for our own vote was not shown; green coloured border for our own vote; corrected German translation (AJAX poll extension is not in translatewiki.net for unknown reason).
Modified paths:
  • /trunk/extensions/AJAXPoll/AJAXPoll.css (modified) (history)
  • /trunk/extensions/AJAXPoll/AJAXPoll.i18n.php (modified) (history)
  • /trunk/extensions/AJAXPoll/AJAXPoll.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AJAXPoll/AJAXPoll.php
@@ -29,7 +29,7 @@
3030 $wgExtensionCredits['parserhook'][] = array(
3131 'path' => __FILE__,
3232 'name' => 'AJAX Poll',
33 - 'version' => '1.4.1',
 33+ 'version' => '1.4.2',
3434 'author' => array( 'Dariusz Siedlecki', 'Jack Phoenix' ),
3535 'description' => 'Allows AJAX-based polls with <tt>&lt;poll&gt;</tt> tag',
3636 'url' => 'https://www.mediawiki.org/wiki/Extension:AJAX_Poll',
@@ -321,7 +321,7 @@
322322 $percent = $wgLang->formatNum( round( ( isset( $poll_result[$i + 1] ) ? $poll_result[$i + 1] : 0 ) * 100 / $amountOfVotes, 2 ) );
323323 }
324324
325 - if ( isset( $r[0] ) && $r[0] == $i ) {
 325+ if ( isset( $r[0] ) && ( $r[0] - 1 == $i ) ) {
326326 $our = true;
327327 } else {
328328 $our = false;
Index: trunk/extensions/AJAXPoll/AJAXPoll.css
@@ -52,7 +52,7 @@
5353 }
5454
5555 .poll .ourVote div {
56 - border: 1px solid #777;
 56+ border: 1px solid #008000;
5757 top: -1px;
5858 left: -1px;
5959 }
Index: trunk/extensions/AJAXPoll/AJAXPoll.i18n.php
@@ -66,8 +66,8 @@
6767 'poll-percent-votes' => '$1% aller Stimmen',
6868 'poll-your-vote' => 'Du hast bereits für "$1" abgestimmt (am $2). Du kannst deine Stimme ändern, indem du eine der untenstehenden Antworten anklickst.',
6969 'poll-no-vote' => 'Bitte stimme unten ab.',
70 - 'poll-info' => 'Es gab $1 Stimmen, seit der Erstellung der Umfrage am $2.', // @todo FIXME: out of date, needs PLURAL
71 - 'poll-submitting' => 'Bitte warte kurz, deine Stimme wird verarbeitet.',
 70+ 'poll-info' => 'Es gab $1 Stimmen seit der Erstellung der Umfrage am $2.', // @todo FIXME: out of date, needs PLURAL
 71+ 'poll-submitting' => 'Bitte warte kurz. Deine Stimme wird verarbeitet.',
7272 );
7373
7474 /** Greek (Ελληνικά)

Comments

#Comment by Siebrand (talk | contribs)   20:44, 15 February 2012

This is one of the many extensions dumped in the Mediawiki repo months ago that are unmaintained and without message documentation. If that were to change, support status in twn will most likely change.

#Comment by Wikinaut (talk | contribs)   21:06, 15 February 2012

add me as maintainer. corresponding changes will be made by me on MediaWiki Manual page. This extensions needs refactoring; I saw this this morning.

But it is clever programmed, I like it from GUI aspects (tiny, quick, easy, simple.)

#Comment by 😂 (talk | contribs)   17:36, 16 February 2012

Since you're working on it, maybe fix the usage of $wgOut, $wgParser, $wgUser and $wgTitle inside of a parser function.

#Comment by Raymond (talk | contribs)   20:00, 16 February 2012

Message documentation needed per Siebrand but more important: The message prefix "poll-" conflicts with the Poll extension. I suggest to rename the prefix to "ajaxpoll-". When this is done I will add the extension to Translatewiki.net

#Comment by Wikinaut (talk | contribs)   20:35, 16 February 2012

Perfect. I had the same idea. Will be in the next commit.

#Comment by Wikinaut (talk | contribs)   22:57, 16 February 2012

"to rename the prefix to "ajaxpoll-". When this is done I will add the extension to Translatewiki.net" done in r111696

Status & tagging log