r101660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101659‎ | r101660 | r101661 >
Date:19:01, 2 November 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: Merge stuff for editor engagement deployment
ArticleFeedback: r101532, r101539, r101611, r101617
MoodBar: To trunk state
WikiLove: r101534, r101548, r101618, r101620, r101621
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ArticleFeedback/ArticleFeedback.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/images/icon-speechbubble-blue.png (added) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.NobleCount (added) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiLove/WikiLove.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiLove/WikiLove.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.i18n.php
@@ -447,7 +447,7 @@
448448 'moodbar-type-confused-title' => 'Зьмешаныя пачуцьці',
449449 'tooltip-moodbar-what' => 'Даведацца болей пра гэтую магчымасьць',
450450 'moodbar-what-label' => 'Што гэта?',
451 - 'moodbar-what-content' => 'Гэтая магчымасьць распрацаваная для дапамогі супольнасьці зразумець вопыт людзей, якія рэдагуюць сайт.
 451+ 'moodbar-what-content' => 'Гэтая магчымасьць распрацаваная для дапамогі супольнасьці зразумець вопыт людзей, якія рэдагуюць сайт.
452452 Для дадатковай інфармацыі, калі ласка, наведайце $1.',
453453 'moodbar-what-link' => 'старонка магчымасьці',
454454 'moodbar-privacy' => 'Дасылаючы, Вы пагаджаецеся на доступ на гэтых $1.',
@@ -1313,6 +1313,49 @@
13141314 'moodbar-log-restore' => 'restaurou a visibilidade de "[[$1]]"',
13151315 );
13161316
 1317+/** Swiss German (Alemannisch)
 1318+ * @author Als-Chlämens
 1319+ */
 1320+$messages['gsw'] = array(
 1321+ 'moodbar-trigger-feedback' => 'Ruggmäldig über Bearbeite',
 1322+ 'moodbar-close' => '(zuemache)',
 1323+ 'moodbar-type-happy-title' => 'Glicklig',
 1324+ 'moodbar-type-sad-title' => 'Truurig',
 1325+ 'moodbar-admin-empty' => 'Kei Ergebniss',
 1326+ 'moodbar-header-id' => 'Ruggmäldigs-ID',
 1327+ 'moodbar-header-timestamp' => 'Zytstämpfel',
 1328+ 'moodbar-header-type' => 'Typ',
 1329+ 'moodbar-header-page' => 'Syte',
 1330+ 'moodbar-header-usertype' => 'Benutzerart',
 1331+ 'moodbar-header-user' => 'Benutzer',
 1332+ 'moodbar-header-editmode' => 'Bearbeitigsmodus',
 1333+ 'moodbar-header-bucket' => 'Testumgäbig',
 1334+ 'moodbar-header-system' => 'Systemtyp',
 1335+ 'moodbar-header-locale' => 'Gebietsschema',
 1336+ 'moodbar-header-useragent' => 'Browser',
 1337+ 'moodbar-header-comment' => 'Kommentar',
 1338+ 'moodbar-header-user-editcount' => 'Bearbeitigszääler',
 1339+ 'moodbar-header-namespace' => 'Namensruum',
 1340+ 'moodbar-header-own-talk' => 'Eigeni Diskussionssyte',
 1341+ 'moodbar-feedback-title' => 'Ruggmäldigs-Brett',
 1342+ 'moodbar-feedback-filters' => 'Filter',
 1343+ 'moodbar-feedback-filters-type' => 'Launi',
 1344+ 'moodbar-feedback-filters-type-happy' => 'Glicklig',
 1345+ 'moodbar-feedback-filters-type-confused' => 'Verwirrt',
 1346+ 'moodbar-feedback-filters-type-sad' => 'Truurig',
 1347+ 'moodbar-feedback-filters-username' => 'Benutzername',
 1348+ 'moodbar-feedback-filters-button' => 'Filter setze',
 1349+ 'moodbar-type-happy' => 'Glicklig',
 1350+ 'moodbar-type-sad' => 'Truurig',
 1351+ 'moodbar-type-confused' => 'verwirrt',
 1352+ 'moodbar-user-anonymized' => 'Anonymisiert',
 1353+ 'moodbar-user-ip' => 'IP-Adräss',
 1354+ 'moodbar-user-user' => 'Registrierte Benutzer',
 1355+ 'moodbar-log-name' => 'Ruggmäldigs-Logbuech',
 1356+ 'moodbar-log-hide' => 'het [[$1]] ussbländet',
 1357+ 'moodbar-log-restore' => 'het [[$1]] wiider yybländet',
 1358+);
 1359+
13171360 /** Hebrew (עברית)
13181361 * @author Amire80
13191362 */
@@ -1394,6 +1437,7 @@
13951438 'moodbar-hide-header' => 'הסתרת הפריט הזה מהתצוגה',
13961439 'moodbar-restore-header' => 'שחזור הנראוּת של הפריט הזה',
13971440 'moodbar-invalid-item' => 'המערכת לא הצליחה למצא את פריט המשוב הנכון.',
 1441+ 'moodbar-feedback-action-error' => 'אירעה שגיאה בעת ניסיון לבצע את הפעולה הזאת.',
13981442 'moodbar-type-happy' => 'שמחה',
13991443 'moodbar-type-sad' => 'עצב',
14001444 'moodbar-type-confused' => 'בלבול',
@@ -1406,6 +1450,21 @@
14071451 'moodbar-log-restore' => 'שחזר את הנראוּת של [[$1]]',
14081452 );
14091453
 1454+/** Upper Sorbian (Hornjoserbsce)
 1455+ * @author Michawiki
 1456+ */
 1457+$messages['hsb'] = array(
 1458+ 'moodbar-close' => '(začinić)',
 1459+ 'moodbar-what-label' => 'Što to je?',
 1460+ 'moodbar-header-type' => 'Typ',
 1461+ 'moodbar-header-page' => 'Strona',
 1462+ 'moodbar-header-user' => 'Wužiwar',
 1463+ 'moodbar-header-comment' => 'Komentary',
 1464+ 'moodbar-header-namespace' => 'Mjenowy rum',
 1465+ 'moodbar-feedback-filters' => 'Filtry',
 1466+ 'moodbar-feedback-filters-username' => 'Wužiwarske mjeno',
 1467+);
 1468+
14101469 /** Interlingua (Interlingua)
14111470 * @author McDutchie
14121471 */
@@ -1417,7 +1476,7 @@
14181477 'moodbar-close' => '(clauder)',
14191478 'moodbar-intro-feedback' => 'Modificar $1 me rendeva…',
14201479 'moodbar-intro-share' => 'Mi experientia in $1 me rendeva…',
1421 - 'moodbar-intro-editing' => 'Le uso de $1 me rendeva...',
 1480+ 'moodbar-intro-editing' => 'Modificar $1 me rendeva…',
14221481 'moodbar-type-happy-title' => 'Felice',
14231482 'moodbar-type-sad-title' => 'Triste',
14241483 'moodbar-type-confused-title' => 'Confuse',
@@ -1486,6 +1545,7 @@
14871546 'moodbar-hide-header' => 'Render iste elemento invisibile',
14881547 'moodbar-restore-header' => 'Restaurar le visibilitate de iste elemento',
14891548 'moodbar-invalid-item' => 'Le systema non poteva trovar le elemento de retroaction correcte.',
 1549+ 'moodbar-feedback-action-error' => 'Un error occurreva durante le tentativa de exequer iste action.',
14901550 'moodbar-type-happy' => 'Felice',
14911551 'moodbar-type-sad' => 'Triste',
14921552 'moodbar-type-confused' => 'Confuse',
@@ -1751,9 +1811,13 @@
17521812 'moodbar-header-user-editcount' => 'ഉപയോക്തൃ തിരുത്തലുകളുടെ എണ്ണം',
17531813 'moodbar-header-namespace' => 'നാമമേഖല',
17541814 'moodbar-header-own-talk' => 'സ്വന്തം സം‌വാദം താൾ',
 1815+ 'moodbar-feedback-filters' => 'അരിപ്പകൾ',
17551816 'moodbar-feedback-filters-type' => 'തരം:',
17561817 'moodbar-feedback-filters-username' => 'ഉപയോക്തൃനാമം',
 1818+ 'moodbar-feedback-filters-button' => 'അരിപ്പകൾ സജ്ജീകരിക്കുക',
 1819+ 'moodbar-feedback-permalink' => 'ഇങ്ങോട്ടുള്ള കണ്ണികൾ',
17571820 'moodbar-feedback-more' => 'കൂടുതൽ',
 1821+ 'moodbar-feedback-nomore' => 'പ്രദർശിപ്പിക്കാൻ കൂടുതൽ ഫലങ്ങളിലില്ല.',
17581822 'moodbar-feedback-newer' => 'പുതിയവ',
17591823 'moodbar-feedback-older' => 'പഴയവ',
17601824 'moodbar-feedback-ajaxerror' => 'കൂടുതൽ ഫലങ്ങൾ ശേഖരിക്കുന്നതിനിടെ പിഴവുണ്ടയി.',
@@ -1939,6 +2003,7 @@
19402004 'moodbar-hide-header' => 'Dit item verbergen uit weergave',
19412005 'moodbar-restore-header' => 'De zichtbaarheid van dit item herstellen',
19422006 'moodbar-invalid-item' => 'Het systeem kon het juiste terugkoppelingsitem niet vinden.',
 2007+ 'moodbar-feedback-action-error' => 'Er is een fout opgetreden tijdens het uitvoeren van deze handeling.',
19432008 'moodbar-type-happy' => 'Blij',
19442009 'moodbar-type-sad' => 'Triest',
19452010 'moodbar-type-confused' => 'Verward',
@@ -2005,9 +2070,9 @@
20062071 'moodbar-intro-feedback' => 'Edytowanie {{GRAMMAR:D.lp|$1}} przyniosło mi...',
20072072 'moodbar-intro-share' => 'Moje doświadczenie w {{GRAMMAR:MS.lp|$1}} przyniosło mi...',
20082073 'moodbar-intro-editing' => 'Edytowanie {{GRAMMAR:D.lp|$1}} przyniosło mi...',
2009 - 'moodbar-type-happy-title' => 'zadowolenie',
2010 - 'moodbar-type-sad-title' => 'rozczarowanie',
2011 - 'moodbar-type-confused-title' => 'mieszane uczucia',
 2074+ 'moodbar-type-happy-title' => 'bez problemu',
 2075+ 'moodbar-type-sad-title' => 'koszmar',
 2076+ 'moodbar-type-confused-title' => 'z kłopotami',
20122077 'tooltip-moodbar-what' => 'Więcej informacji na temat tej funkcji',
20132078 'moodbar-what-label' => 'O co tu chodzi?',
20142079 'moodbar-what-content' => 'To narzędzie pomaga społeczności zrozumieć doświadczenia osób edytujących projekt.
@@ -2049,10 +2114,10 @@
20502115 'moodbar-header-own-talk' => 'Własna strona dyskusji',
20512116 'moodbar-feedback-title' => 'Tablica z otrzymanymi opiniami',
20522117 'moodbar-feedback-filters' => 'Filtrowanie',
2053 - 'moodbar-feedback-filters-type' => 'Nastrój',
2054 - 'moodbar-feedback-filters-type-happy' => 'szczęśliwy',
2055 - 'moodbar-feedback-filters-type-confused' => 'mieszane uczucia',
2056 - 'moodbar-feedback-filters-type-sad' => 'smutny',
 2118+ 'moodbar-feedback-filters-type' => 'Wrażenia',
 2119+ 'moodbar-feedback-filters-type-happy' => 'Bez problemu',
 2120+ 'moodbar-feedback-filters-type-confused' => 'Z kłopotami',
 2121+ 'moodbar-feedback-filters-type-sad' => 'Koszmar',
20572122 'moodbar-feedback-filters-username' => 'Nazwa użytkownika',
20582123 'moodbar-feedback-filters-button' => 'Filtruj',
20592124 'moodbar-feedback-whatis' => 'Jak działa to narzędzie?',
@@ -2068,9 +2133,9 @@
20692134 'moodbar-feedback-show' => 'pokaż ukrytą opinię',
20702135 'moodbar-feedback-hide' => 'ukryj opinię',
20712136 'moodbar-feedback-restore' => 'przywróć ukrytą opinię',
2072 - 'moodbar-type-happy' => 'Szczęśliwy',
2073 - 'moodbar-type-sad' => 'Smutny',
2074 - 'moodbar-type-confused' => 'Zmieszany',
 2137+ 'moodbar-type-happy' => 'Bez problemu',
 2138+ 'moodbar-type-sad' => 'Koszmar',
 2139+ 'moodbar-type-confused' => 'Z kłopotami',
20752140 'moodbar-user-anonymized' => 'Anonimowo',
20762141 'moodbar-user-ip' => 'Adres IP',
20772142 'moodbar-user-user' => 'Zarejestrowany użytkownik',
@@ -2676,6 +2741,7 @@
26772742 'moodbar-success-subtitle' => 'Dela din redigeringsupplevelse så hjälper du oss att förbättra $1 .',
26782743 'moodbar-error-subtitle' => 'Något gick fel! Prova att ge din feedback senare.',
26792744 'right-moodbar-view' => 'Visa och exportera MoodBar feedback',
 2745+ 'right-moodbar-admin' => 'Ändra synlighet på feedback instrumentpanelen',
26802746 'moodbar-admin-title' => 'MoodBar feedback',
26812747 'moodbar-admin-intro' => 'Den här sidan låter dig se feedback som har skickats in med MoodBar.',
26822748 'moodbar-admin-empty' => 'Inga resultat',
@@ -2694,15 +2760,43 @@
26952761 'moodbar-header-user-editcount' => 'Användarens antal redigeringar',
26962762 'moodbar-header-namespace' => 'Namnrymd',
26972763 'moodbar-header-own-talk' => 'Egen diskussionssida',
 2764+ 'moodbar-feedback-title' => 'Feedback instrumentpanelen',
 2765+ 'moodbar-feedback-filters' => 'Filter',
 2766+ 'moodbar-feedback-filters-type' => 'Humör:',
 2767+ 'moodbar-feedback-filters-type-happy' => 'Glad',
 2768+ 'moodbar-feedback-filters-type-confused' => 'Förvirrad',
 2769+ 'moodbar-feedback-filters-type-sad' => 'Ledsen',
26982770 'moodbar-feedback-filters-username' => 'Användarnamn',
 2771+ 'moodbar-feedback-filters-button' => 'Filtrera',
 2772+ 'moodbar-feedback-whatis' => 'Vad är det här för funktion?',
 2773+ 'moodbar-feedback-permalink' => 'Länka hit',
 2774+ 'moodbar-feedback-noresults' => 'Det finns inga kommentarer som matchar ditt filter.',
 2775+ 'moodbar-feedback-more' => 'Mer',
 2776+ 'moodbar-feedback-nomore' => 'Det finns inga mer resultat att visa.',
26992777 'moodbar-feedback-newer' => 'Nyare',
27002778 'moodbar-feedback-older' => 'Äldre',
 2779+ 'moodbar-feedback-ajaxerror' => 'Ett fel uppstod vid hämtandet av fler resultat.',
 2780+ 'moodbar-user-hidden' => '(Användare dold)',
 2781+ 'moodbar-comment-hidden' => '(Feedback dold genom administrativa åtgärder)',
 2782+ 'moodbar-feedback-show' => 'Visa dold feedback',
 2783+ 'moodbar-feedback-hide' => 'dölja feedback',
 2784+ 'moodbar-hidden-footer' => 'Dold Feedback$1',
 2785+ 'moodbar-feedback-restore' => 'återställa dold feedback',
 2786+ 'moodbar-action-item' => 'Feedback objekt:',
 2787+ 'moodbar-hide-header' => 'Dölj detta objekt från vyn',
 2788+ 'moodbar-restore-header' => 'Återställa detta objekts synlighet',
 2789+ 'moodbar-invalid-item' => 'Systemet kunde inte hitta korrekt feedbackobjekt.',
 2790+ 'moodbar-feedback-action-error' => 'Ett fel inträffade när åtgärden utfördes.',
27012791 'moodbar-type-happy' => 'Glad',
27022792 'moodbar-type-sad' => 'Ledsen',
27032793 'moodbar-type-confused' => 'Förvirrad',
27042794 'moodbar-user-anonymized' => 'Anonymiserad',
27052795 'moodbar-user-ip' => 'IP-adress',
27062796 'moodbar-user-user' => 'Registrerad användare',
 2797+ 'moodbar-log-name' => 'Feedback log',
 2798+ 'moodbar-log-header' => 'Detta är loggen av åtgärder som vidtas på de feedback objekt som finns förtecknade på [[Special:FeedbackDashboard|feedback instrumentpanelen]].',
 2799+ 'moodbar-log-hide' => 'dolde [[$1]]',
 2800+ 'moodbar-log-restore' => 'återställde synlighet för [[$1]]',
27072801 );
27082802
27092803 /** Telugu (తెలుగు)
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js
@@ -22,11 +22,11 @@
2323 </div>\
2424 <div class="mw-moodBar-form">\
2525 <div class="mw-moodBar-formTitle">\
26 - <span class="mw-moodBar-formNote"><html:msg key="moodbar-form-note" /></span>\
 26+ <span class="mw-moodBar-formNote"><span id="mw-moodBar-charCount"></span><html:msg key="moodbar-form-note-dynamic" /></span>\
2727 <html:msg key="moodbar-form-title" />\
2828 </div>\
2929 <div class="mw-moodBar-formInputs">\
30 - <textarea rows="3" maxlength="140" class="mw-moodBar-formInput" /></textarea>\
 30+ <textarea rows="3" maxlength="140" id="mw-moodBar-feedbackInput" class="mw-moodBar-formInput" /></textarea>\
3131 <div class="mw-moodBar-privacy"></div>\
3232 <input type="button" class="mw-moodBar-formSubmit" disabled="disabled" />\
3333 </div>\
@@ -207,6 +207,22 @@
208208 }
209209 )
210210 .end()
 211+ // set up character count
 212+ .find( '.mw-moodBar-formNote' )
 213+ .html(
 214+ function() {
 215+ var message, counterElement;
 216+ message = mw.msg( 'moodbar-form-note-dynamic' );
 217+ counterElement = mw.html.element( 'span', {
 218+ 'id': 'mw-moodBar-charCount',
 219+ } );
 220+ return mw.html.escape( message )
 221+ .replace( /\$1/, counterElement );
 222+ }
 223+ )
 224+ .end()
 225+
 226+
211227 // Submit
212228 .find( '.mw-moodBar-formSubmit' )
213229 .val( mw.msg( 'moodbar-form-submit' ) )
@@ -216,6 +232,11 @@
217233 $.moodBar.submit( mb.feedbackItem );
218234 } )
219235 .end();
 236+
 237+ // Set up character counter
 238+ // This is probably not the right way to do this.
 239+ $( '#mw-moodBar-feedbackInput' ).NobleCount('#mw-moodBar-charCount', {max_chars:140});
 240+
220241 },
221242
222243 core: function() {
@@ -249,7 +270,7 @@
250271
251272 mb.ui.overlay.width(newWidth);
252273 mb.ui.overlay.hide();
253 -
 274+
254275 // Bind triger
255276 mb.ui.trigger.click( mb.event.trigger );
256277 },
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/images/icon-speechbubble-blue.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/images/icon-speechbubble-blue.png
___________________________________________________________________
Added: svn:mime-type
257278 + image/png
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.css
@@ -12,4 +12,8 @@
1313 white-space: nowrap;
1414 line-height: 1.125em;
1515 text-transform: none;
 16+ /* @embed */
 17+ background: url(images/icon-speechbubble-blue.png);
 18+ background-repeat: no-repeat;
 19+ padding-left: 18px;
1620 }
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.NobleCount/jquery.NobleCount.js
@@ -0,0 +1,480 @@
 2+/******************************************************************************************************
 3+
 4+ jQuery.NobleCount
 5+
 6+ Author Jeremy Horn
 7+ Version 1.0
 8+ Date: 3/21/2010
 9+
 10+ Copyright (c) 2010 Jeremy Horn- jeremydhorn(at)gmail(dot)c0m | http://tpgblog.com
 11+ Dual licensed under MIT and GPL.
 12+
 13+ DESCRIPTION
 14+ NobleCount... for a more 'proper' count of the characters remaining.
 15+
 16+ NobleCount is a customizable jQuery plugin for a more the improved counting of the remaining
 17+ characters, and resulting behaviors, of a text entry object, e.g. input textfield, textarea.
 18+
 19+ As text is entered into the target text area an object for the purposes of tracking
 20+ the total number of characters remaining, defined as the maximum number of characters
 21+ minus the current total number of characters within the text entry object, and storing
 22+ that information visually and/or within the DOM as an HTML 5 compliant data-* attribute.
 23+
 24+ Events and CSS Class alterations, if defined, are triggered based on current user
 25+ interaction with the target text entry object as well as the current state (positive or
 26+ negative) of the character remaining value.
 27+
 28+ NobleCount supports pre-existing text within the text object.
 29+ NobleCount supports jQuery chaining.
 30+
 31+ Within NobleCount context...
 32+ NEGATIVE is defined as Integers < 0
 33+ POSITIVE is defined as Integers >= 0 [on_positive will fire when char_rem == 0]
 34+
 35+ BY DEFAULT
 36+ - maximum characters EQUAL 140 characters
 37+ - no events defined
 38+ - no class changes defined
 39+ - no DOM attributes are created/altered
 40+ - user permitted to type past the maximum number of characters limit, resulting in
 41+ negative number of characters remaining
 42+
 43+ IMPLEMENTATION
 44+
 45+ $('#textarea1').NobleCount('#characters_remaining1');
 46+ $('#textfield2').NobleCount('#characters_remaining2', { / * OPTIONS * / });
 47+
 48+ COMPATIBILITY
 49+
 50+ Tested in FF3.5, IE7
 51+ With jQuery 1.3.x, 1.4.x
 52+
 53+ METHOD(S)
 54+ To properly intialize, both the text entry object and the object that will store the
 55+ total number of characters remaining must exist and be passed to NobleCount.
 56+
 57+ $(TEXT_ENTRY_OBJECT).NobleCount(CHARACTERS_REMAINING_OBJECT);
 58+
 59+ Any callback functions assigned to any of the availale events are passed the following
 60+ parameters: t_obj, char_area, c_settings, char_rem
 61+
 62+ t_obj text entry object
 63+
 64+ char_area selection of the characters remaining object
 65+
 66+ c_settings result of the options passed into NobleCount at time of
 67+ initialization merged with the default options
 68+
 69+ ** this is a GREAT way to pass in and remember other state
 70+ information that will be needed upon the triggering of
 71+ NobleCount events **
 72+
 73+ char_rem integer representation of the total number of characters
 74+ remaining resulting from the calculated difference between
 75+ the target maximum number of characters and the current
 76+ number of characters currently within t_obj
 77+
 78+ Both TEXT_ENTRY_OBJECT and CHARACTERS_REMAINING_OBJECT must be specified and valid.
 79+
 80+ Upon successful initialization, all appropriate events and classes are applied to
 81+ the CHARACTERS_REMAINING_OBJECT, including the storage (if not disabled) visually
 82+ or only in the DOM (if enabled) of the integer representing the number of characters
 83+ remaining.
 84+
 85+ The target maximum number of characters (max_chars) are determined by the following
 86+ precedence rules....
 87+
 88+ if max_chars passed via constructor
 89+ max_chars = max_chars passed
 90+ else if number exists within characters_remaining object and number > 0
 91+ max_chars = number within the text() of characters_remaining object
 92+ else use the NobleCount's default max_chars
 93+
 94+ CUSTOMIZATION
 95+
 96+ NobleCount(c_obj, <OPTIONS>)
 97+ e.g. $(t_obj).NobleCount(c_obj, {max_chars:100px});
 98+
 99+
 100+ on_negative class (STRING) or FUNCTION that is applied/called
 101+ when characters remaining is negative IF DEFINED
 102+
 103+ on_positive class (STRING) or FUNCTION that is applied/called
 104+ when characters remaining is positive IF DEFINED
 105+
 106+ on_update FUNCTION that is called when characters remaining changes
 107+
 108+ max_chars target maximum number of characters
 109+
 110+ block_negative if TRUE, then all attempts are made to block entering
 111+ more than max_characters; not effective against user
 112+ pasting in blocks of text that exceed the max_chars value
 113+ otherwise, text area will let individual entering the text
 114+ to exceed max_chars limit (characters remaining becomes
 115+ negative)
 116+
 117+ cloak: false, if TRUE, then no visual updates of characters remaining
 118+ object (c_obj) will occur; this does not have any effect
 119+ on the char_rem value returned via any event callbacks
 120+ otherwise, the text within c_obj is constantly updated to
 121+ represent the total number of characters remaining until
 122+ the max_chars limit has been reached
 123+
 124+ in_dom: false if TRUE and cloak is ALSO TRUE, then the number of characters
 125+ remaining are stored as the attribute of c_obj
 126+ named 'data-noblecount'
 127+
 128+ !NOTE: if enabled, due to constant updating of a DOM element
 129+ attribute user experience can appear sluggish while
 130+ the individual is modifying the text entry object (t_obj)
 131+
 132+
 133+ EXAMPLE OPTIONS =
 134+ {
 135+ on_negative: 'go_red',
 136+ on_positive: 'go_green',
 137+ max_chars: 25,
 138+ on_update: function(t_obj, char_area, c_settings, char_rem){
 139+ if ((char_rem % 10) == 0) {
 140+ char_area.css('font-weight', 'bold');
 141+ char_area.css('font-size', '300%');
 142+ } else {
 143+ char_area.css('font-weight', 'normal');
 144+ char_area.css('font-size', '100%');
 145+ }
 146+ }
 147+ };
 148+
 149+ MORE
 150+
 151+ For more details about NobleCount, its implementation, usage, and examples, go to:
 152+ http://tpgblog.com/noblecount/
 153+
 154+******************************************************************************************************/
 155+
 156+(function($) {
 157+
 158+ /**********************************************************************************
 159+
 160+ FUNCTION
 161+ NobleCount
 162+
 163+ DESCRIPTION
 164+ NobleCount method constructor
 165+
 166+ allows for customization of maximum length and related update/length
 167+ behaviors
 168+
 169+ e.g. $(text_obj).NobleCount(characters_remaining_obj);
 170+
 171+ REQUIRED: c_obj
 172+ OPTIONAL: options
 173+
 174+ **********************************************************************************/
 175+
 176+ $.fn.NobleCount = function(c_obj, options) {
 177+ var c_settings;
 178+ var mc_passed = false;
 179+
 180+ // if c_obj is not specified, then nothing to do here
 181+ if (typeof c_obj == 'string') {
 182+ // check for new & valid options
 183+ c_settings = $.extend({}, $.fn.NobleCount.settings, options);
 184+
 185+ // was max_chars passed via options parameter?
 186+ if (typeof options != 'undefined') {
 187+ mc_passed = ((typeof options.max_chars == 'number') ? true : false);
 188+ }
 189+
 190+ // process all provided objects
 191+ return this.each(function(){
 192+ var $this = $(this);
 193+
 194+ // attach events to c_obj
 195+ attach_nobility($this, c_obj, c_settings, mc_passed);
 196+ });
 197+ }
 198+
 199+ return this;
 200+ };
 201+
 202+
 203+ /**********************************************************************************
 204+
 205+ FUNCTION
 206+ NobleCount.settings
 207+
 208+ DESCRIPTION
 209+ publically accessible data stucture containing the max_chars and
 210+ event handling specifications for NobleCount
 211+
 212+ can be directly accessed by '$.fn.NobleCount.settings = ... ;'
 213+
 214+ **********************************************************************************/
 215+ $.fn.NobleCount.settings = {
 216+
 217+ on_negative: null, // class (STRING) or FUNCTION that is applied/called
 218+ // when characters remaining is negative
 219+ on_positive: null, // class (STRING) or FUNCTION that is applied/called
 220+ // when characters remaining is positive
 221+ on_update: null, // FUNCTION that is called when characters remaining
 222+ // changes
 223+ max_chars: 140, // maximum number of characters
 224+ block_negative: false, // if true, then all attempts are made to block entering
 225+ // more than max_characters
 226+ cloak: false, // if true, then no visual updates of characters
 227+ // remaining (c_obj) occur
 228+ in_dom: false // if true and cloak == true, then number of characters
 229+ // remaining are stored as the attribute
 230+ // 'data-noblecount' of c_obj
 231+
 232+ };
 233+
 234+
 235+ //////////////////////////////////////////////////////////////////////////////////
 236+
 237+ // private functions and settings
 238+
 239+ /**********************************************************************************
 240+
 241+ FUNCTION
 242+ attach_nobility
 243+
 244+ DESCRIPTION
 245+ performs all initialization routines and display initiation
 246+
 247+ assigns both the keyup and keydown events to the target text entry
 248+ object; both keyup and keydown are used to provide the smoothest
 249+ user experience
 250+
 251+ if max_chars_passed via constructor
 252+ max_chars = max_chars_passed
 253+ else if number exists within counting_object (and number > 0)
 254+ max_chars = counting_object.number
 255+ else use default max_chars
 256+
 257+ PRE
 258+ t_obj and c_obj EXIST
 259+ c_settings and mc_passed initialized
 260+
 261+ POST
 262+ maximum number of characters for t_obj calculated and stored in max_char
 263+ key events attached to t_obj
 264+
 265+ **********************************************************************************/
 266+
 267+ function attach_nobility(t_obj, c_obj, c_settings, mc_passed){
 268+ var max_char = c_settings.max_chars;
 269+ var char_area = $(c_obj);
 270+
 271+ // first determine if max_char needs adjustment
 272+ if (!mc_passed) {
 273+ var tmp_num = char_area.text();
 274+ var isPosNumber = (/^[1-9]\d*$/).test(tmp_num);
 275+
 276+ if (isPosNumber) {
 277+ max_char = tmp_num;
 278+ }
 279+ }
 280+
 281+ // initialize display of characters remaining
 282+ // * note: initializing should not trigger on_update
 283+ event_internals(t_obj, char_area, c_settings, max_char, true);
 284+
 285+ // then attach the events -- seem to work better than keypress
 286+ $(t_obj).keydown(function(e) {
 287+ event_internals(t_obj, char_area, c_settings, max_char, false);
 288+
 289+ // to block text entry, return false
 290+ if (check_block_negative(e, t_obj, c_settings, max_char) == false) {
 291+ return false;
 292+ }
 293+ });
 294+
 295+ $(t_obj).keyup(function(e) {
 296+ event_internals(t_obj, char_area, c_settings, max_char, false);
 297+
 298+ // to block text entry, return false
 299+ if (check_block_negative(e, t_obj, c_settings, max_char) == false) {
 300+ return false;
 301+ }
 302+ });
 303+ }
 304+
 305+
 306+ /**********************************************************************************
 307+
 308+ FUNCTION
 309+ check_block_negative
 310+
 311+ DESCRIPTION
 312+ determines whether or not text entry within t_obj should be prevented
 313+
 314+ PRE
 315+ e EXISTS
 316+ t_obj VALID
 317+ c_settings and max_char initialized / calculated
 318+
 319+ POST
 320+ if t_obj text entry should be prevented FALSE is returned
 321+ otherwise TRUE returned
 322+
 323+ TODO
 324+ improve selection detection and permissible behaviors experience
 325+ ALSO
 326+ doesnt CURRENTLY block from the pasting of large chunks of text that
 327+ exceed max_char
 328+
 329+ **********************************************************************************/
 330+
 331+ function check_block_negative(e, t_obj, c_settings, max_char){
 332+ if (c_settings.block_negative) {
 333+ var char_code = e.which;
 334+ var selected;
 335+
 336+ // goofy handling required to work in both IE and FF
 337+ if (typeof document.selection != 'undefined') {
 338+ selected = (document.selection.createRange().text.length > 0);
 339+ } else {
 340+ selected = (t_obj[0].selectionStart != t_obj[0].selectionEnd);
 341+ }
 342+
 343+ //return false if can't write more
 344+ if ((!((find_remaining(t_obj, max_char) < 1) &&
 345+ (char_code > 47 || char_code == 32 || char_code == 0 || char_code == 13) &&
 346+ !e.ctrlKey &&
 347+ !e.altKey &&
 348+ !selected)) == false) {
 349+
 350+ // block text entry
 351+ return false;
 352+ }
 353+ }
 354+
 355+ // allow text entry
 356+ return true;
 357+ }
 358+
 359+
 360+ /**********************************************************************************
 361+
 362+ FUNCTION
 363+ find_remaining
 364+
 365+ DESCRIPTION
 366+ determines of the number of characters permitted (max_char), the number of
 367+ characters remaining until that limit has been reached
 368+
 369+ PRE
 370+ t_obj and max_char EXIST and are VALID
 371+
 372+ POST
 373+ returns integer of the difference between max_char and total number of
 374+ characters within the text entry object (t_obj)
 375+
 376+ **********************************************************************************/
 377+
 378+ function find_remaining(t_obj, max_char){
 379+ return max_char - ($(t_obj).val()).length;
 380+ }
 381+
 382+
 383+ /**********************************************************************************
 384+
 385+ FUNCTION
 386+ event_internals
 387+
 388+ DESCRIPTION
 389+ primarily used for the calculation of appropriate behavior resulting from
 390+ any event attached to the text entry object (t_obj)
 391+
 392+ whenever the char_rem and related display and/or DOM information needs
 393+ updating this function is called
 394+
 395+ if cloaking is being used, then no visual representation of the characters
 396+ remaining, nor attempt by this plugin to change any of its visual
 397+ characteristics will occur
 398+
 399+ if cloaking and in_dom are both TRUE, then the number of characters
 400+ remaining are stored within the HTML 5 compliant attribute of the
 401+ character count remaining object (c_obj) labeled 'data-noblecount'
 402+
 403+ PRE
 404+ c_settings, init_disp initialized
 405+
 406+ POST
 407+ performs all updates to the DOM visual and otherwise required
 408+ performs all relevant function calls
 409+
 410+ **********************************************************************************/
 411+
 412+ function event_internals(t_obj, char_area, c_settings, max_char, init_disp) {
 413+ var char_rem = find_remaining(t_obj, max_char);
 414+
 415+ // is chararacters remaining positive or negative
 416+ if (char_rem < 0) {
 417+ toggle_states(c_settings.on_negative, c_settings.on_positive, t_obj, char_area, c_settings, char_rem);
 418+ } else {
 419+ toggle_states(c_settings.on_positive, c_settings.on_negative, t_obj, char_area, c_settings, char_rem);
 420+ }
 421+
 422+ // determine whether or not to update the text of the char_area (or c_obj)
 423+ if (c_settings.cloak) {
 424+ // this slows stuff down quite a bit; TODO: implement better method of publically accessible data storage
 425+ if (c_settings.in_dom) {
 426+ char_area.attr('data-noblecount', char_rem);
 427+ }
 428+ } else {
 429+ // show the numbers of characters remaining
 430+ char_area.text(char_rem);
 431+ }
 432+
 433+ // if event_internals isn't being called for initialization purposes and
 434+ // on_update is a properly defined function then call it on this update
 435+ if (!init_disp && jQuery.isFunction(c_settings.on_update)) {
 436+ c_settings.on_update(t_obj, char_area, c_settings, char_rem);
 437+ }
 438+ }
 439+
 440+
 441+ /**********************************************************************************
 442+
 443+ FUNCTION
 444+ toggle_states
 445+
 446+ DESCRIPTION
 447+ performs the toggling operations between the watched positive and negative
 448+ characteristics
 449+
 450+ first, enables/triggers/executes the toggle_on behavior/class
 451+ second, disables the trigger_off class
 452+
 453+ PRE
 454+ toggle_on, toggle_off
 455+ IF DEFINED,
 456+ must be a string representation of a VALID class
 457+ OR
 458+ must be a VALID function
 459+
 460+ POST
 461+ toggle_on objects have been applied/executed
 462+ toggle_off class has been removed (if it is a class)
 463+
 464+ **********************************************************************************/
 465+
 466+ function toggle_states(toggle_on, toggle_off, t_obj, char_area, c_settings, char_rem){
 467+ if (toggle_on != null) {
 468+ if (typeof toggle_on == 'string') {
 469+ char_area.addClass(toggle_on);
 470+ } else if (jQuery.isFunction(toggle_on)) {
 471+ toggle_on(t_obj, char_area, c_settings, char_rem);
 472+ }
 473+ }
 474+
 475+ if (toggle_off != null) {
 476+ if (typeof toggle_off == 'string') {
 477+ char_area.removeClass(toggle_off);
 478+ }
 479+ }
 480+ }
 481+})(jQuery);
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.NobleCount/jquery.NobleCount.js
___________________________________________________________________
Added: svn:eol-style
1482 + native
Added: svn:executable
2483 + *
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css
@@ -39,7 +39,7 @@
4040
4141 .fbd-filters-input {
4242 margin: 0.25em 0 0.25em 0.75em;
43 - width: 10em;
 43+ width: 9em;
4444 }
4545
4646 #fbd-filters-types ul {
@@ -228,6 +228,8 @@
229229 .fbd-item-hide {
230230 float: right;
231231 font-size: 0.8em;
 232+ margin-left: 0.2em;
 233+ margin-right: 0.2em;
232234 }
233235
234236 .fbd-item-restore {
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -35,7 +35,6 @@
3636 */
3737 function setCookies() {
3838 $.cookie( 'moodbar-feedback-types', formState.types.join( '|' ), { 'path': '/', 'expires': 7 } );
39 - $.cookie( 'moodbar-feedback-username', formState.username, { 'path': '/', 'expires': 7 } );
4039 }
4140
4241 /**
@@ -45,15 +44,7 @@
4645 */
4746 function loadFromCookies() {
4847 var cookieTypes = $.cookie( 'moodbar-feedback-types' ),
49 - $username = $( '#fbd-filters-username' ),
5048 changed = false;
51 - if ( $username.val() == '' ) {
52 - var cookieUsername = $.cookie( 'moodbar-feedback-username' );
53 - if ( cookieUsername != '' && cookieUsername !== null ) {
54 - $username.val( cookieUsername );
55 - changed = true;
56 - }
57 - }
5849
5950 if ( cookieTypes ) {
6051 // Because calling .indexOf() on an array doesn't work in all browsers,
@@ -333,12 +324,6 @@
334325 loadComments( 'filter' );
335326 } );
336327
337 - $( '.fbd-item-userLink' ).live( 'click', function( e ) {
338 - e.preventDefault();
339 - $('#fbd-filters-username').val( $(this).text() );
340 - $('#fbd-filters').children('form').submit();
341 - } );
342 -
343328 $( '#fbd-list-more' ).children( 'a' ).click( function( e ) {
344329 e.preventDefault();
345330 // We don't call saveFormState() here because we want to use the state of the form
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.php
@@ -92,6 +92,11 @@
9393 $wgResourceModules['ext.moodBar.init']['dependencies'][] = 'mediawiki.user';
9494 }
9595
 96+
 97+$wgResourceModules['jquery.NobleCount'] = $mbResourceTemplate + array(
 98+ 'scripts' => 'jquery.NobleCount/jquery.NobleCount.js',
 99+);
 100+
96101 $wgResourceModules['ext.moodBar.core'] = $mbResourceTemplate + array(
97102 'styles' => 'ext.moodBar/ext.moodBar.core.css',
98103 'scripts' => 'ext.moodBar/ext.moodBar.core.js',
@@ -130,6 +135,7 @@
131136 'mediawiki.util',
132137 'ext.moodBar.init', // just in case
133138 'jquery.localize',
 139+ 'jquery.NobleCount',
134140 'jquery.moodBar',
135141 ),
136142 'position' => 'bottom',
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -35,7 +35,9 @@
3636 'articlefeedback-survey-title',
3737 'articlefeedback-survey-message-success',
3838 'articlefeedback-survey-message-error',
39 - 'articlefeedback-survey-disclaimer'
 39+ 'articlefeedback-survey-disclaimer',
 40+ 'articlefeedback-survey-disclaimerlink',
 41+ 'articlefeedback-privacyurl'
4042 ),
4143 'dependencies' => array(
4244 'jquery.ui.dialog',
@@ -72,7 +74,6 @@
7375 'articlefeedback-form-panel-helpimprove-note',
7476 'articlefeedback-form-panel-helpimprove-email-placeholder',
7577 'articlefeedback-form-panel-helpimprove-privacy',
76 - 'articlefeedback-form-panel-helpimprove-privacylink',
7778 'articlefeedback-form-panel-submit',
7879 'articlefeedback-form-panel-success',
7980 'articlefeedback-form-panel-pending',
@@ -83,7 +84,7 @@
8485 'articlefeedback-report-panel-description',
8586 'articlefeedback-report-empty',
8687 'articlefeedback-report-ratings',
87 - 'parentheses',
 88+ 'articlefeedback-privacyurl'
8889 ),
8990 'dependencies' => array(
9091 'jquery.appear',
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -592,14 +592,14 @@
593593 .find( '.articleFeedback-helpimprove-note' )
594594 // Can't use .text() with mw.message(, /* $1 */ link).toString(),
595595 // because 'link' should not be re-escaped (which would happen if done by mw.message)
596 - .html( function(){
 596+ .html( function() {
597597 var link = mw.html.element(
598598 'a', {
599 - href: mw.util.wikiGetlink( mw.msg('articlefeedback-form-panel-helpimprove-privacylink') )
600 - }, mw.msg('articlefeedback-form-panel-helpimprove-privacy')
 599+ href: mw.msg( 'articlefeedback-privacyurl' )
 600+ }, mw.msg( 'articlefeedback-form-panel-helpimprove-privacy' )
601601 );
602 - return mw.html.escape( mw.msg( 'articlefeedback-form-panel-helpimprove-note') )
603 - .replace( /\$1/, mw.message( 'parentheses', link ).toString() );
 602+ return mw.html.escape( mw.msg( 'articlefeedback-form-panel-helpimprove-note' ) )
 603+ .replace( /\$1/, link );
604604 })
605605 .end()
606606 .find( '.articleFeedback-helpimprove-email' )
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -116,7 +116,21 @@
117117 $form.find( '#prefswitch-survey-origin' ).text( mw.config.get( 'wgTitle' ) );
118118
119119 // Insert disclaimer message
120 - $button.before( $( '<div>' ).addClass( 'articleFeedback-survey-disclaimer' ).text( mw.msg( 'articlefeedback-survey-disclaimer' ) ) );
 120+ $button.before(
 121+ $( '<div>' )
 122+ .addClass( 'articleFeedback-survey-disclaimer' )
 123+ // Can't use .text() with mw.message(, /* $1 */ link).toString(),
 124+ // because 'link' should not be re-escaped (which would happen if done by mw.message)
 125+ .html( function() {
 126+ var link = mw.html.element(
 127+ 'a', {
 128+ href: mw.msg( 'articlefeedback-privacyurl' )
 129+ }, mw.msg( 'articlefeedback-survey-disclaimerlink' )
 130+ );
 131+ return mw.html.escape( mw.msg( 'articlefeedback-survey-disclaimer' ) )
 132+ .replace( /\$1/, link );
 133+ })
 134+ );
121135
122136 // Take dialog out of loading state
123137 $dialog.removeClass( 'loading' );
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.css
@@ -10,3 +10,7 @@
1111 font-weight: normal; /* Override bold */
1212 font-style: italic;
1313 }
 14+
 15+.articleFeedback-survey-disclaimer a {
 16+ color: #0645AD; /* Override blackish color set by JUI */
 17+}
Index: branches/wmf/1.18wmf1/extensions/ArticleFeedback/ArticleFeedback.i18n.php
@@ -26,7 +26,8 @@
2727 'articlefeedback-survey-submit' => 'Submit',
2828 'articlefeedback-survey-title' => 'Please answer a few questions',
2929 'articlefeedback-survey-thanks' => 'Thanks for filling out the survey.',
30 - 'articlefeedback-survey-disclaimer' => 'To help improve this feature, your feedback may be shared anonymously with the Wikipedia community.',
 30+ 'articlefeedback-survey-disclaimer' => 'By submitting, you agree to transparency under these $1.',
 31+ 'articlefeedback-survey-disclaimerlink' => 'terms',
3132 /* ext.articleFeedback and jquery.articleFeedback */
3233 'articlefeedback-error' => 'An error has occured. Please try again later.',
3334 'articlefeedback-form-switch-label' => 'Rate this page',
@@ -40,10 +41,9 @@
4142 'articlefeedback-form-panel-expertise-hobby' => 'It is a deep personal passion',
4243 'articlefeedback-form-panel-expertise-other' => 'The source of my knowledge is not listed here',
4344 'articlefeedback-form-panel-helpimprove' => 'I would like to help improve Wikipedia, send me an e-mail (optional)',
44 - 'articlefeedback-form-panel-helpimprove-note' => 'We will send you a confirmation e-mail. We will not share your address with anyone. $1',
 45+ 'articlefeedback-form-panel-helpimprove-note' => 'We will send you a confirmation e-mail. We will not share your e-mail address with outside parties as per our $1.',
4546 'articlefeedback-form-panel-helpimprove-email-placeholder' => 'email@example.org', // Optional
46 - 'articlefeedback-form-panel-helpimprove-privacy' => 'Privacy policy',
47 - 'articlefeedback-form-panel-helpimprove-privacylink' => 'Project:Privacy policy',
 47+ 'articlefeedback-form-panel-helpimprove-privacy' => 'feedback privacy statement',
4848 'articlefeedback-form-panel-submit' => 'Submit ratings',
4949 'articlefeedback-form-panel-pending' => 'Your ratings have not been submitted yet',
5050 'articlefeedback-form-panel-success' => 'Saved successfully',
@@ -98,6 +98,7 @@
9999 'articlefeedback-survey-message-success' => 'Thanks for filling out the survey.',
100100 'articlefeedback-survey-message-error' => 'An error has occurred.
101101 Please try again later.',
 102+ 'articlefeedback-privacyurl' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement',
102103 /* Special:ArticleFeedback */
103104 'articleFeedback-table-caption-dailyhighsandlows' => 'Today\'s highs and lows',
104105 'articleFeedback-table-caption-dailyhighs' => 'Pages with highest ratings: $1',
@@ -168,9 +169,10 @@
169170 {{Identical|Submit}}',
170171 'articlefeedback-survey-title' => 'This text appears in the title bar of the survey dialog.',
171172 'articlefeedback-survey-thanks' => 'This text appears when the user has successfully submitted the survey.',
172 - 'articlefeedback-survey-disclaimer' => 'This text appears on the survey form below the comment field and above the submit button.',
 173+ 'articlefeedback-survey-disclaimer' => 'This text appears on the survey form below the comment field and above the submit button. $1 is a link pointing to the privacy policy. The link text is in the articlefeedback-survey-disclaimerlink message.',
173174 'articlefeedback-form-panel-explanation-link' => 'Do not translate "Project:". Also translate the "ArticleFeedback" special page name at [[Special:AdvancedTranslate]].',
174175 'articlefeedback-form-panel-helpimprove-email-placeholder' => '{{Optional}}',
 176+ 'articlefeedback-form-panel-helpimprove-note' => '$1 is a link pointing to the privacy policy. The link text is in the articlefeedback-form-panel-helpimprove-privacy message.',
175177 'articlefeedback-form-panel-helpimprove-privacy' => '{{Identical|Privacy}}',
176178 'articlefeedback-form-panel-helpimprove-privacylink' => 'Do not translate "Project:"
177179 {{Identical|Privacypage}}',
@@ -178,6 +180,7 @@
179181 'articlefeedback-pitch-join-body' => 'Based on {{msg-mw|Articlefeedback-pitch-join-message}}.',
180182 'articlefeedback-pitch-join-login' => '{{Identical|Log in}}',
181183 'articleFeedback-table-heading-page' => '{{Identical|Page}}',
 184+ 'articlefeedback-privacyurl' => 'This URL can be changed to point to a translated version of the page if it exists.',
182185 'articleFeedback-table-heading-average' => '{{Identical|Average}}',
183186 'articleFeedback-copy-above-highlow-tables' => 'The variable $1 will contain a full URL to a discussion page where the dashboard can be discussed - since the dashboard is powered by a special page, we can not rely on the built-in MediaWiki talk page.',
184187 );
Index: branches/wmf/1.18wmf1/extensions/WikiLove/WikiLove.php
@@ -143,6 +143,9 @@
144144 'wikilove-commons-url',
145145 'wikilove-err-preview-api',
146146 'wikilove-err-send-api',
 147+ 'wikilove-terms',
 148+ 'wikilove-terms-link',
 149+ 'wikilove-terms-url',
147150 ),
148151 'dependencies' => array(
149152 'ext.wikiLove.defaultOptions',
Index: branches/wmf/1.18wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css
@@ -238,7 +238,7 @@
239239 /*#mw-wikilove-dialog*/ #mw-wikilove-add-details .mw-wikilove-note {
240240 font-weight: light;
241241 font-size: 0.9em;
242 - color: #999;
 242+ color: #888888;
243243 }
244244
245245 /*#mw-wikilove-dialog*/ #mw-wikilove-add-details textarea {
@@ -325,6 +325,13 @@
326326 float: right;
327327 }
328328
 329+#mw-wikilove-dialog #mw-wikilove-terms {
 330+ margin-top: 0.5em;
 331+ text-align: right;
 332+ font-size: 0.9em;
 333+ color: #888888;
 334+}
 335+
329336 #mw-wikilove-dialog .mw-wikilove-spinner {
330337 float: right;
331338 margin-top: 0.9em;
Index: branches/wmf/1.18wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -45,6 +45,21 @@
4646 $typeList.append( $( '<li tabindex="0"></li>' ).append( $button ) );
4747 }
4848
 49+ var commonsLink = $( '<a>' )
 50+ .attr( 'href', mw.msg( 'wikilove-commons-url' ) )
 51+ .attr( 'target', '_blank' )
 52+ .text( mw.msg( 'wikilove-commons-link' ) )
 53+ .wrap( '<div>' ) // or .html() will only return the link text
 54+ .parent()
 55+ .html();
 56+ termsLink = $( '<a> ')
 57+ .attr( 'href', mw.msg( 'wikilove-terms-url' ) )
 58+ .attr( 'target', '_blank' )
 59+ .text( mw.msg( 'wikilove-terms-link' ) )
 60+ .wrap( '<div>' )
 61+ .parent()
 62+ .html();
 63+
4964 $dialog = $( '\
5065 <div id="mw-wikilove-dialog">\
5166 <div id="mw-wikilove-select-type">\
@@ -92,7 +107,7 @@
93108 <span class="mw-wikilove-note" id="mw-wikilove-image-note"><html:msg key="wikilove-image-example"/></span>\
94109 <input type="text" class="text" id="mw-wikilove-image"/>\
95110 <div id="mw-wikilove-commons-text">\
96 - ' + mw.msg( 'wikilove-commons-text', '<a href="' + mw.msg( 'wikilove-commons-url' ) + '" target="_blank">' + mw.msg( 'wikilove-commons-link' ) +'</a>' ) + '\
 111+ ' + mw.html.escape( mw.msg( 'wikilove-commons-text' ) ).replace( /\$1/, commonsLink ) + '\
97112 </div>\
98113 <label for="mw-wikilove-message" id="mw-wikilove-message-label"><html:msg key="wikilove-enter-message"/></label>\
99114 <span class="mw-wikilove-note" id="mw-wikilove-message-note"><html:msg key="wikilove-omit-sig"/></span>\
@@ -109,6 +124,9 @@
110125 <span class="mw-wikilove-number">3</span>\
111126 <h3><html:msg key="wikilove-preview"/></h3>\
112127 <div id="mw-wikilove-preview-area"></div>\
 128+ <div id="mw-wikilove-terms">\
 129+ ' + mw.html.escape( mw.msg( 'wikilove-terms' ) ).replace( /\$1/, termsLink ) + '\
 130+ </div>\
113131 <form id="mw-wikilove-send-form">\
114132 <button class="submit" id="mw-wikilove-button-send" type="submit"></button>\
115133 <div id="mw-wikilove-send-spinner" class="mw-wikilove-spinner"></div>\
Index: branches/wmf/1.18wmf1/extensions/WikiLove/WikiLove.i18n.php
@@ -56,6 +56,9 @@
5757 'wikilove-commons-text' => 'You can find images by browsing $1.',
5858 'wikilove-commons-link' => 'Wikimedia Commons',
5959 'wikilove-commons-url' => 'http://commons.wikimedia.org',
 60+ 'wikilove-terms' => 'By submitting, you agree to transparency under these $1.',
 61+ 'wikilove-terms-link' => 'terms',
 62+ 'wikilove-terms-url' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement',
6063 );
6164
6265 /** Message documentation (Message documentation)
@@ -78,7 +81,7 @@
7982 'wikilove-add-details' => '[[File:Wiki Love 003.png|thumb]]',
8083 'wikilove-image' => '[[File:Wiki Love 004.png|thumb]]',
8184 'wikilove-header' => '[[File:Wiki Love 003.png|thumb]]
82 -Header is the subject of the added message (so perhaps subject is a better term..), i.e. what gets between == ... ==',
 85+Header is the subject of the added message (so perhaps subject is a better term..), i.e. what gets added between == ... ==',
8386 'wikilove-title' => '[[File:Wiki Love 004.png|thumb]]
8487 Title is the title of the wikilove box (e.g. "Barnstar")',
8588 'wikilove-enter-message' => '[[File:Wiki Love 003.png|thumb]]',
@@ -108,6 +111,10 @@
109112 'wikilove-commons-text' => '[[File:Wiki Love 004.png|thumb]]
110113 $1 gets replaced by a link with {{msg-mw|wikilove-commons-link}} ("Wikimedia Commons") as caption and {{msg-mw|wikilove-commons-url}} as URL.',
111114 'wikilove-commons-url' => 'This URL can be changed to point at a localised page on Wikimedia Commons.',
 115+ 'wikilove-terms' => '[[File:Wiki_Love_003.png]]
 116+A notice that appears above the Send WikiLove button in small text. Try to keep this concise. $1 is replaced with the actual link.',
 117+ 'wikilove-terms-link' => 'The text that links to the terms of service. Should not be capitalized.',
 118+ 'wikilove-terms-url' => 'This URL can be changed to point to a translated version of the page if it exists.',
112119 );
113120
114121 /** Afrikaans (Afrikaans)

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101532Updated language as per requests from WMF legal department.tparscal21:36, 1 November 2011
r101534legal terms update, part 1. follow-up coming soonkaldari21:39, 1 November 2011
r101539Follow-up r101532: email -> e-mail address.siebrand21:58, 1 November 2011
r101548legal terms update for WikiLove, part deuxkaldari23:00, 1 November 2011
r101611Fix r101532 which was so broken that I refuse to believe it was tested even o...catrope10:54, 2 November 2011
r101617Followup r101611, move the privacy policy URL back into a message. Kaldari ma...catrope11:31, 2 November 2011
r101618Followup r101548: build the link in a less scary way, with proper escapingcatrope11:34, 2 November 2011
r101620Followup r101618: actually make things work. You can't feed HTML to mw.msg() ...catrope12:34, 2 November 2011
r101621Followup r101618, r101620: forgot target="_blank"catrope12:36, 2 November 2011

Status & tagging log