r109288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109287‎ | r109288 | r109289 >
Date:02:42, 18 January 2012
Author:preilly
Status:ok
Tags:
Comment:
1.18wmf: MFT r109276 - r109287
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/SopaNoticeTemplate.php (added) (history)
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/stylesheets/beta_common.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/stylesheets/common.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/SopaNoticeTemplate.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+if ( !defined( 'MEDIAWIKI' ) ) {
 5+ die( -1 );
 6+}
 7+
 8+class SopaNoticeTemplate extends MobileFrontendTemplate {
 9+
 10+ public function getHTML() {
 11+
 12+ $sopaNotice = $this->data['messages']['mobile-frontend-sopa-notice'];
 13+
 14+ $noticeHtml = <<<HTML
 15+ <div class='mwm-message mwm-notice'>
 16+ {$sopaNotice}
 17+ <br/>
 18+ <br/>
 19+ </div>
 20+HTML;
 21+ return $noticeHtml;
 22+ }
 23+}
Property changes on: branches/wmf/1.18wmf1/extensions/MobileFrontend/SopaNoticeTemplate.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -54,6 +54,7 @@
5555 'OptOutTemplate',
5656 'ApplicationWmlTemplate',
5757 'ThanksNoticeTemplate',
 58+ 'SopaNoticeTemplate',
5859 );
5960
6061 foreach ( $autoloadClasses as $class ) {
@@ -200,6 +201,7 @@
201202 'mobile-frontend-login',
202203 'mobile-frontend-placeholder',
203204 'mobile-frontend-dismiss-notification',
 205+ 'mobile-frontend-sopa-notice',
204206 );
205207
206208 public $itemsToRemove = array(
@@ -676,6 +678,10 @@
677679 $this->sendApplicationVersionVaryHeader();
678680 $this->checkUserStatus();
679681 $this->checkUserLoggedIn();
 682+
 683+ if (self::$code === 'en') {
 684+ self::$displayNoticeId = 2;
 685+ }
680686
681687 if ( self::$title->isSpecial( 'Userlogin' ) && self::$isBetaGroupMember ) {
682688 self::$wsLoginToken = $wgRequest->getSessionData( 'wsLoginToken' );
@@ -1584,6 +1590,13 @@
15851591 $noticeHtml = $thanksNoticeTemplate->getHTML();
15861592 }
15871593 }
 1594+ if ( !empty( self::$displayNoticeId ) ) {
 1595+ if ( intval( self::$displayNoticeId ) === 2 ) {
 1596+ $sopaNoticeTemplate = new SopaNoticeTemplate();
 1597+ $sopaNoticeTemplate->set( 'messages', self::$messages );
 1598+ $noticeHtml = $sopaNoticeTemplate->getHTML();
 1599+ }
 1600+ }
15881601
15891602 // header( 'Content-Type: application/xhtml+xml; charset=utf-8' );
15901603 $searchTemplate = $this->getSearchTemplate();
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.i18n.php
@@ -74,6 +74,7 @@
7575 'mobile-frontend-login' => 'Log in',
7676 'mobile-frontend-placeholder' => 'Type your search here...',
7777 'mobile-frontend-dismiss-notification' => 'dismiss this notification',
 78+ 'mobile-frontend-sopa-notice' => '<strong>IMAGINE A WORLD WITHOUT FREE KNOWLEDGE</strong>,<br/>Right now, the U.S. Congress is considering legislation that could cripple this site<br/> and your ability to access information online. <a href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Mobile_Learn_more">Learn more</a>.',
7879 );
7980
8081 /** Message documentation (Message documentation)
@@ -670,6 +671,7 @@
671672 * @author EugeneZelenko
672673 * @author Jim-by
673674 * @author Renessaince
 675+ * @author Wizardist
674676 */
675677 $messages['be-tarask'] = array(
676678 'mobile-frontend-desc' => 'Мабільны інтэрфэйс',
@@ -730,9 +732,11 @@
731733 'mobile-frontend-password' => 'Пароль:',
732734 'mobile-frontend-login' => 'Увайсьці',
733735 'mobile-frontend-placeholder' => 'Увядзіце пошукавы выраз тут…',
 736+ 'mobile-frontend-dismiss-notification' => 'схаваць паведамленьне',
734737 );
735738
736739 /** Bulgarian (Български)
 740+ * @author DCLXVI
737741 * @author Spiritia
738742 * @author Vladimir Penov
739743 */
@@ -765,7 +769,7 @@
766770 'mobile-frontend-download-full-version' => 'Изтегляне на пълната версия',
767771 'mobile-frontend-file-namespace' => 'Файл',
768772 'mobile-frontend-wml-continue' => 'Продължаване...',
769 - 'mobile-frontend-wml-back' => 'Назад...',
 773+ 'mobile-frontend-wml-back' => 'Връщане...',
770774 'mobile-frontend-view' => 'Мобилен изглед',
771775 'mobile-frontend-opt-in-yes-button' => 'да',
772776 'mobile-frontend-opt-in-no-button' => 'не',
@@ -1155,6 +1159,7 @@
11561160 'mobile-frontend-password' => 'Heslo:',
11571161 'mobile-frontend-login' => 'Přihlásit se',
11581162 'mobile-frontend-placeholder' => 'Sem napište hledaný výraz…',
 1163+ 'mobile-frontend-dismiss-notification' => 'zavřít toto oznámení',
11591164 );
11601165
11611166 /** Church Slavic (Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ) */
@@ -1344,6 +1349,7 @@
13451350 'mobile-frontend-password' => 'Passwort:',
13461351 'mobile-frontend-login' => 'Anmelden',
13471352 'mobile-frontend-placeholder' => 'Gib hier deine Suche ein ...',
 1353+ 'mobile-frontend-dismiss-notification' => 'diese Benachrichtigung schließen',
13481354 );
13491355
13501356 /** German (formal address) (‪Deutsch (Sie-Form)‬)
@@ -2019,6 +2025,7 @@
20202026 'mobile-frontend-password' => 'Mot de passe:',
20212027 'mobile-frontend-login' => 'Se connecter',
20222028 'mobile-frontend-placeholder' => 'Tapez votre recherche ici...',
 2029+ 'mobile-frontend-dismiss-notification' => 'rejeter cette notification',
20232030 );
20242031
20252032 /** Franco-Provençal (Arpetan)
@@ -2210,6 +2217,7 @@
22112218 'mobile-frontend-password' => 'Contrasinal:',
22122219 'mobile-frontend-login' => 'Rexistro',
22132220 'mobile-frontend-placeholder' => 'Insira a súa procura aquí...',
 2221+ 'mobile-frontend-dismiss-notification' => 'agochar esta notificación',
22142222 );
22152223
22162224 /** Ancient Greek (Ἀρχαία ἑλληνικὴ) */
@@ -2440,6 +2448,7 @@
24412449 'mobile-frontend-password' => 'ססמה:',
24422450 'mobile-frontend-login' => 'כניסה',
24432451 'mobile-frontend-placeholder' => 'הקלידו את מילות החיפוש כאן...',
 2452+ 'mobile-frontend-dismiss-notification' => 'הסתרת ההודעה הזאת',
24442453 );
24452454
24462455 /** Hindi (हिन्दी)
@@ -2615,6 +2624,7 @@
26162625 'mobile-frontend-password' => 'Hesło:',
26172626 'mobile-frontend-login' => 'Přizjewić',
26182627 'mobile-frontend-placeholder' => 'Zapodaj tu swoje pytanje...',
 2628+ 'mobile-frontend-dismiss-notification' => 'Tute zdźělenje zaćisnyć',
26192629 );
26202630
26212631 /** Hungarian (Magyar)
@@ -2758,6 +2768,7 @@
27592769 'mobile-frontend-password' => 'Contrasigno:',
27602770 'mobile-frontend-login' => 'Aperir session',
27612771 'mobile-frontend-placeholder' => 'Entra un recerca hic...',
 2772+ 'mobile-frontend-dismiss-notification' => 'clauder iste notification',
27622773 );
27632774
27642775 /** Indonesian (Bahasa Indonesia)
@@ -3347,6 +3358,7 @@
33483359 'mobile-frontend-password' => '비밀번호:',
33493360 'mobile-frontend-login' => '로그인',
33503361 'mobile-frontend-placeholder' => '검색할 것을 여기 입력하세요...',
 3362+ 'mobile-frontend-dismiss-notification' => '이 알림 숨기기',
33513363 );
33523364
33533365 /** Karachay-Balkar (Къарачай-Малкъар) */
@@ -3594,6 +3606,7 @@
35953607 'mobile-frontend-leave-feedback-message' => 'Message',
35963608 'mobile-frontend-leave-feedback-cancel' => 'Ofbriechen',
35973609 'mobile-frontend-leave-feedback-submit' => 'Feedback schécken',
 3610+ 'mobile-frontend-leave-feedback-link-text' => 'Feedback vun der Erweiderung MobileFrontend',
35983611 'mobile-frontend-leave-feedback' => 'Feedback fir de mobile Site',
35993612 'mobile-frontend-leave-feedback-thanks' => 'Merci fir Äre Feedback!',
36003613 'mobile-frontend-language' => 'Sprooch',
@@ -3680,6 +3693,7 @@
36813694 'mobile-frontend-password' => 'Wachwaord:',
36823695 'mobile-frontend-login' => 'Mèlj aan',
36833696 'mobile-frontend-placeholder' => 'Zeuk hie...',
 3697+ 'mobile-frontend-dismiss-notification' => 'verberg de notificatie',
36843698 );
36853699
36863700 /** Lumbaart (Lumbaart) */
@@ -3938,6 +3952,7 @@
39393953 'mobile-frontend-password' => 'Лозинка:',
39403954 'mobile-frontend-login' => 'Најава',
39413955 'mobile-frontend-placeholder' => 'Тука внесете го бараното...',
 3956+ 'mobile-frontend-dismiss-notification' => 'отстрани го известувањето',
39423957 );
39433958
39443959 /** Malayalam (മലയാളം)
@@ -4054,6 +4069,7 @@
40554070 * @author Evision
40564071 * @author Kaajawa
40574072 * @author Mahitgar
 4073+ * @author Prabodh1987
40584074 * @author Rahuldeshmukh101
40594075 * @author V.narsikar
40604076 */
@@ -4117,6 +4133,7 @@
41184134 'mobile-frontend-password' => 'परवलीचा शब्द',
41194135 'mobile-frontend-login' => 'प्रवेश करा',
41204136 'mobile-frontend-placeholder' => 'आपला हवा असलेला शोध येथे टंकलिखित करा ...',
 4137+ 'mobile-frontend-dismiss-notification' => 'ही सुचना पुसा',
41214138 );
41224139
41234140 /** Malay (Bahasa Melayu)
@@ -4181,6 +4198,7 @@
41824199 'mobile-frontend-password' => 'Kata laluan:',
41834200 'mobile-frontend-login' => 'Log masuk',
41844201 'mobile-frontend-placeholder' => 'Taipkan carian anda di sini...',
 4202+ 'mobile-frontend-dismiss-notification' => 'abaikan pemberitahuan ini',
41854203 );
41864204
41874205 /** Maltese (Malti) */
@@ -4322,6 +4340,7 @@
43234341 * @author Servien
43244342 */
43254343 $messages['nds-nl'] = array(
 4344+ 'mobile-frontend-desc' => 'Mobiele weergave',
43264345 'mobile-frontend-search-submit' => 'Artikel',
43274346 'mobile-frontend-search-results' => 'Zeukresultaoten',
43284347 'mobile-frontend-no-article-found' => 'Gien artikel evunnen',
@@ -4334,20 +4353,45 @@
43354354 'mobile-frontend-hide-button' => 'Verbargen',
43364355 'mobile-frontend-disable-button' => 'Uutschakelen',
43374356 'mobile-frontend-back-button' => 'Weerumme',
4338 - 'mobile-frontend-regular-site' => 'Disse pagina in de standardweergave bekieken',
 4357+ 'mobile-frontend-regular-site' => 'Disse pagina in de standardweergave van {{SITENAME}} bekieken',
43394358 'mobile-frontend-perm-stop-redirect' => 'Altied de standardweergave gebruken',
43404359 'mobile-frontend-error-page-title' => 'Der geet effen wat mis!',
4341 - 'mobile-frontend-error-page-text' => "De mobiele versie van Wikipedie is in ontwikkeling en wulen bin hard an t wark um alle fouten op te lossen.
 4360+ 'mobile-frontend-error-page-text' => "De mobiele weergave van {{SITENAME}} is in ontwikkeling en wulen bin hard an t wark um alle fouten op te lössen.
43424361 Wulen hebben al bericht ehad over disse fout en zullen t zo gauw meugelik verhelpen.
43434362 Vorttemee zie'j hier t resultaot.",
43444363 'mobile-frontend-are-you-sure' => "Bi'j daor wisse van?",
4345 - 'mobile-frontend-explain-disable' => "Bi'j der wisse van da'j de mobiele versie van Wikipedie uut willen schakelen? A'j <b>Uutschakelen</b> kiezen, dan wö'j vanaof dat moment niet deurverwezen naor disse mobiele versie van Wikipedie a'j Wikipedie bezeuken.",
 4364+ 'mobile-frontend-explain-disable' => "Bi'j der wisse van da'j de mobiele versie van {{SITENAME}} uut willen schakelen? A'j <b>Uutschakelen</b> kiezen, dan wö'j vanaof dat moment niet deurverwezen naor disse mobiele versie van {{SITENAME}} a'j {{SITENAME}} bezeuken.",
43464365 'mobile-frontend-nav-end' => 'Einde',
43474366 'mobile-frontend-nav-top' => 'Begin',
43484367 'mobile-frontend-nav-edit' => 'Bewarken',
43494368 'mobile-frontend-nav-history' => 'Geschiedenisse',
43504369 'mobile-frontend-search-text' => 'Zeuken',
43514370 'mobile-frontend-contact-us' => "A'j nog vragen of opmarkingen hebben, stuur ons gerust n berichjen op t adres mobile@wikipedia.org",
 4371+ 'mobile-frontend-file-namespace' => 'Bestaand',
 4372+ 'mobile-frontend-wml-back' => 'Weerumme ...',
 4373+ 'mobile-frontend-view' => 'Mobiele weergave',
 4374+ 'mobile-frontend-opt-in-message' => 'Mitdoon an de mobiele bèta?',
 4375+ 'mobile-frontend-opt-in-yes-button' => 'ja',
 4376+ 'mobile-frontend-opt-in-no-button' => 'nee',
 4377+ 'mobile-frontend-opt-in-title' => 'Mitdoon mit de bèta',
 4378+ 'mobile-frontend-opt-out-message' => "Wi'j bèta uutzetten?",
 4379+ 'mobile-frontend-opt-out-yes-button' => 'ja',
 4380+ 'mobile-frontend-opt-out-no-button' => 'nee',
 4381+ 'mobile-frontend-opt-out-title' => 'Stoppen mit testen',
 4382+ 'mobile-frontend-disable-images' => 'Aofbeeldingen in de mobiele weergave uutzetten',
 4383+ 'mobile-frontend-enable-images' => 'Aofbeeldingen in de mobiele weergave anzetten',
 4384+ 'mobile-frontend-leave-feedback-subject' => 'Onderwarp:',
 4385+ 'mobile-frontend-leave-feedback-message' => 'Bericht',
 4386+ 'mobile-frontend-leave-feedback-cancel' => 'Aofbreken',
 4387+ 'mobile-frontend-leave-feedback-submit' => 'Troegkoppeling opslaon',
 4388+ 'mobile-frontend-leave-feedback-link-text' => 'Troegkoppeling over de mobiele weergave',
 4389+ 'mobile-frontend-leave-feedback' => 'Troegkoppeling achterlaoten',
 4390+ 'mobile-frontend-leave-feedback-thanks' => 'Bedankt veur joew troegkoppeling',
 4391+ 'mobile-frontend-language' => 'Taal',
 4392+ 'mobile-frontend-username' => 'Gebrukersnaam:',
 4393+ 'mobile-frontend-password' => 'Wachtwoord:',
 4394+ 'mobile-frontend-login' => 'Anmelden',
 4395+ 'mobile-frontend-placeholder' => 'Hier zeuken ...',
43524396 );
43534397
43544398 /** Nepali (नेपाली)
@@ -4856,6 +4900,7 @@
48574901 'mobile-frontend-password' => 'Ciav:',
48584902 'mobile-frontend-login' => 'Intra',
48594903 'mobile-frontend-placeholder' => 'Anseriss toa arserca ambelessì...',
 4904+ 'mobile-frontend-dismiss-notification' => 'arfuda sta notìfica',
48604905 );
48614906
48624907 /** Western Punjabi (پنجابی)
@@ -5328,6 +5373,7 @@
53295374 'mobile-frontend-password' => 'Пароль:',
53305375 'mobile-frontend-login' => 'Войти',
53315376 'mobile-frontend-placeholder' => 'Строка для поиска...',
 5377+ 'mobile-frontend-dismiss-notification' => 'скрыть это уведомление',
53325378 );
53335379
53345380 /** Rusyn (Русиньскый)
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/stylesheets/common.css
@@ -289,3 +289,13 @@
290290 padding: 3px;
291291 }
292292
 293+.mwm-message.mwm-notice {
 294+ background: #000000;
 295+ font-size: 1.1em;
 296+ color: #ffffff;
 297+}
 298+.mwm-message.mwm-notice a {
 299+ text-decoration: underline;
 300+ font-weight: bold;
 301+ color: #ffffff;
 302+}
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/stylesheets/beta_common.css
@@ -314,3 +314,13 @@
315315 padding: 3px;
316316 }
317317
 318+.mwm-message.mwm-notice {
 319+ background: #000000;
 320+ font-size: 1.1em;
 321+ color: #ffffff;
 322+}
 323+.mwm-message.mwm-notice a {
 324+ text-decoration: underline;
 325+ font-weight: bold;
 326+ color: #ffffff;
 327+}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109276add sopa banner to mobilepreilly01:33, 18 January 2012
r109287add styles to beta common stylesheetpreilly02:40, 18 January 2012

Status & tagging log