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 |
1 | 24 | + native |
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 | 'OptOutTemplate', |
56 | 56 | 'ApplicationWmlTemplate', |
57 | 57 | 'ThanksNoticeTemplate', |
| 58 | + 'SopaNoticeTemplate', |
58 | 59 | ); |
59 | 60 | |
60 | 61 | foreach ( $autoloadClasses as $class ) { |
— | — | @@ -200,6 +201,7 @@ |
201 | 202 | 'mobile-frontend-login', |
202 | 203 | 'mobile-frontend-placeholder', |
203 | 204 | 'mobile-frontend-dismiss-notification', |
| 205 | + 'mobile-frontend-sopa-notice', |
204 | 206 | ); |
205 | 207 | |
206 | 208 | public $itemsToRemove = array( |
— | — | @@ -676,6 +678,10 @@ |
677 | 679 | $this->sendApplicationVersionVaryHeader(); |
678 | 680 | $this->checkUserStatus(); |
679 | 681 | $this->checkUserLoggedIn(); |
| 682 | + |
| 683 | + if (self::$code === 'en') { |
| 684 | + self::$displayNoticeId = 2; |
| 685 | + } |
680 | 686 | |
681 | 687 | if ( self::$title->isSpecial( 'Userlogin' ) && self::$isBetaGroupMember ) { |
682 | 688 | self::$wsLoginToken = $wgRequest->getSessionData( 'wsLoginToken' ); |
— | — | @@ -1584,6 +1590,13 @@ |
1585 | 1591 | $noticeHtml = $thanksNoticeTemplate->getHTML(); |
1586 | 1592 | } |
1587 | 1593 | } |
| 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 | + } |
1588 | 1601 | |
1589 | 1602 | // header( 'Content-Type: application/xhtml+xml; charset=utf-8' ); |
1590 | 1603 | $searchTemplate = $this->getSearchTemplate(); |
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.i18n.php |
— | — | @@ -74,6 +74,7 @@ |
75 | 75 | 'mobile-frontend-login' => 'Log in', |
76 | 76 | 'mobile-frontend-placeholder' => 'Type your search here...', |
77 | 77 | '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>.', |
78 | 79 | ); |
79 | 80 | |
80 | 81 | /** Message documentation (Message documentation) |
— | — | @@ -670,6 +671,7 @@ |
671 | 672 | * @author EugeneZelenko |
672 | 673 | * @author Jim-by |
673 | 674 | * @author Renessaince |
| 675 | + * @author Wizardist |
674 | 676 | */ |
675 | 677 | $messages['be-tarask'] = array( |
676 | 678 | 'mobile-frontend-desc' => 'Мабільны інтэрфэйс', |
— | — | @@ -730,9 +732,11 @@ |
731 | 733 | 'mobile-frontend-password' => 'Пароль:', |
732 | 734 | 'mobile-frontend-login' => 'Увайсьці', |
733 | 735 | 'mobile-frontend-placeholder' => 'Увядзіце пошукавы выраз тут…', |
| 736 | + 'mobile-frontend-dismiss-notification' => 'схаваць паведамленьне', |
734 | 737 | ); |
735 | 738 | |
736 | 739 | /** Bulgarian (Български) |
| 740 | + * @author DCLXVI |
737 | 741 | * @author Spiritia |
738 | 742 | * @author Vladimir Penov |
739 | 743 | */ |
— | — | @@ -765,7 +769,7 @@ |
766 | 770 | 'mobile-frontend-download-full-version' => 'Изтегляне на пълната версия', |
767 | 771 | 'mobile-frontend-file-namespace' => 'Файл', |
768 | 772 | 'mobile-frontend-wml-continue' => 'Продължаване...', |
769 | | - 'mobile-frontend-wml-back' => 'Назад...', |
| 773 | + 'mobile-frontend-wml-back' => 'Връщане...', |
770 | 774 | 'mobile-frontend-view' => 'Мобилен изглед', |
771 | 775 | 'mobile-frontend-opt-in-yes-button' => 'да', |
772 | 776 | 'mobile-frontend-opt-in-no-button' => 'не', |
— | — | @@ -1155,6 +1159,7 @@ |
1156 | 1160 | 'mobile-frontend-password' => 'Heslo:', |
1157 | 1161 | 'mobile-frontend-login' => 'Přihlásit se', |
1158 | 1162 | 'mobile-frontend-placeholder' => 'Sem napište hledaný výraz…', |
| 1163 | + 'mobile-frontend-dismiss-notification' => 'zavřít toto oznámení', |
1159 | 1164 | ); |
1160 | 1165 | |
1161 | 1166 | /** Church Slavic (Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ) */ |
— | — | @@ -1344,6 +1349,7 @@ |
1345 | 1350 | 'mobile-frontend-password' => 'Passwort:', |
1346 | 1351 | 'mobile-frontend-login' => 'Anmelden', |
1347 | 1352 | 'mobile-frontend-placeholder' => 'Gib hier deine Suche ein ...', |
| 1353 | + 'mobile-frontend-dismiss-notification' => 'diese Benachrichtigung schließen', |
1348 | 1354 | ); |
1349 | 1355 | |
1350 | 1356 | /** German (formal address) (Deutsch (Sie-Form)) |
— | — | @@ -2019,6 +2025,7 @@ |
2020 | 2026 | 'mobile-frontend-password' => 'Mot de passe:', |
2021 | 2027 | 'mobile-frontend-login' => 'Se connecter', |
2022 | 2028 | 'mobile-frontend-placeholder' => 'Tapez votre recherche ici...', |
| 2029 | + 'mobile-frontend-dismiss-notification' => 'rejeter cette notification', |
2023 | 2030 | ); |
2024 | 2031 | |
2025 | 2032 | /** Franco-Provençal (Arpetan) |
— | — | @@ -2210,6 +2217,7 @@ |
2211 | 2218 | 'mobile-frontend-password' => 'Contrasinal:', |
2212 | 2219 | 'mobile-frontend-login' => 'Rexistro', |
2213 | 2220 | 'mobile-frontend-placeholder' => 'Insira a súa procura aquí...', |
| 2221 | + 'mobile-frontend-dismiss-notification' => 'agochar esta notificación', |
2214 | 2222 | ); |
2215 | 2223 | |
2216 | 2224 | /** Ancient Greek (Ἀρχαία ἑλληνικὴ) */ |
— | — | @@ -2440,6 +2448,7 @@ |
2441 | 2449 | 'mobile-frontend-password' => 'ססמה:', |
2442 | 2450 | 'mobile-frontend-login' => 'כניסה', |
2443 | 2451 | 'mobile-frontend-placeholder' => 'הקלידו את מילות החיפוש כאן...', |
| 2452 | + 'mobile-frontend-dismiss-notification' => 'הסתרת ההודעה הזאת', |
2444 | 2453 | ); |
2445 | 2454 | |
2446 | 2455 | /** Hindi (हिन्दी) |
— | — | @@ -2615,6 +2624,7 @@ |
2616 | 2625 | 'mobile-frontend-password' => 'Hesło:', |
2617 | 2626 | 'mobile-frontend-login' => 'Přizjewić', |
2618 | 2627 | 'mobile-frontend-placeholder' => 'Zapodaj tu swoje pytanje...', |
| 2628 | + 'mobile-frontend-dismiss-notification' => 'Tute zdźělenje zaćisnyć', |
2619 | 2629 | ); |
2620 | 2630 | |
2621 | 2631 | /** Hungarian (Magyar) |
— | — | @@ -2758,6 +2768,7 @@ |
2759 | 2769 | 'mobile-frontend-password' => 'Contrasigno:', |
2760 | 2770 | 'mobile-frontend-login' => 'Aperir session', |
2761 | 2771 | 'mobile-frontend-placeholder' => 'Entra un recerca hic...', |
| 2772 | + 'mobile-frontend-dismiss-notification' => 'clauder iste notification', |
2762 | 2773 | ); |
2763 | 2774 | |
2764 | 2775 | /** Indonesian (Bahasa Indonesia) |
— | — | @@ -3347,6 +3358,7 @@ |
3348 | 3359 | 'mobile-frontend-password' => '비밀번호:', |
3349 | 3360 | 'mobile-frontend-login' => '로그인', |
3350 | 3361 | 'mobile-frontend-placeholder' => '검색할 것을 여기 입력하세요...', |
| 3362 | + 'mobile-frontend-dismiss-notification' => '이 알림 숨기기', |
3351 | 3363 | ); |
3352 | 3364 | |
3353 | 3365 | /** Karachay-Balkar (Къарачай-Малкъар) */ |
— | — | @@ -3594,6 +3606,7 @@ |
3595 | 3607 | 'mobile-frontend-leave-feedback-message' => 'Message', |
3596 | 3608 | 'mobile-frontend-leave-feedback-cancel' => 'Ofbriechen', |
3597 | 3609 | 'mobile-frontend-leave-feedback-submit' => 'Feedback schécken', |
| 3610 | + 'mobile-frontend-leave-feedback-link-text' => 'Feedback vun der Erweiderung MobileFrontend', |
3598 | 3611 | 'mobile-frontend-leave-feedback' => 'Feedback fir de mobile Site', |
3599 | 3612 | 'mobile-frontend-leave-feedback-thanks' => 'Merci fir Äre Feedback!', |
3600 | 3613 | 'mobile-frontend-language' => 'Sprooch', |
— | — | @@ -3680,6 +3693,7 @@ |
3681 | 3694 | 'mobile-frontend-password' => 'Wachwaord:', |
3682 | 3695 | 'mobile-frontend-login' => 'Mèlj aan', |
3683 | 3696 | 'mobile-frontend-placeholder' => 'Zeuk hie...', |
| 3697 | + 'mobile-frontend-dismiss-notification' => 'verberg de notificatie', |
3684 | 3698 | ); |
3685 | 3699 | |
3686 | 3700 | /** Lumbaart (Lumbaart) */ |
— | — | @@ -3938,6 +3952,7 @@ |
3939 | 3953 | 'mobile-frontend-password' => 'Лозинка:', |
3940 | 3954 | 'mobile-frontend-login' => 'Најава', |
3941 | 3955 | 'mobile-frontend-placeholder' => 'Тука внесете го бараното...', |
| 3956 | + 'mobile-frontend-dismiss-notification' => 'отстрани го известувањето', |
3942 | 3957 | ); |
3943 | 3958 | |
3944 | 3959 | /** Malayalam (മലയാളം) |
— | — | @@ -4054,6 +4069,7 @@ |
4055 | 4070 | * @author Evision |
4056 | 4071 | * @author Kaajawa |
4057 | 4072 | * @author Mahitgar |
| 4073 | + * @author Prabodh1987 |
4058 | 4074 | * @author Rahuldeshmukh101 |
4059 | 4075 | * @author V.narsikar |
4060 | 4076 | */ |
— | — | @@ -4117,6 +4133,7 @@ |
4118 | 4134 | 'mobile-frontend-password' => 'परवलीचा शब्द', |
4119 | 4135 | 'mobile-frontend-login' => 'प्रवेश करा', |
4120 | 4136 | 'mobile-frontend-placeholder' => 'आपला हवा असलेला शोध येथे टंकलिखित करा ...', |
| 4137 | + 'mobile-frontend-dismiss-notification' => 'ही सुचना पुसा', |
4121 | 4138 | ); |
4122 | 4139 | |
4123 | 4140 | /** Malay (Bahasa Melayu) |
— | — | @@ -4181,6 +4198,7 @@ |
4182 | 4199 | 'mobile-frontend-password' => 'Kata laluan:', |
4183 | 4200 | 'mobile-frontend-login' => 'Log masuk', |
4184 | 4201 | 'mobile-frontend-placeholder' => 'Taipkan carian anda di sini...', |
| 4202 | + 'mobile-frontend-dismiss-notification' => 'abaikan pemberitahuan ini', |
4185 | 4203 | ); |
4186 | 4204 | |
4187 | 4205 | /** Maltese (Malti) */ |
— | — | @@ -4322,6 +4340,7 @@ |
4323 | 4341 | * @author Servien |
4324 | 4342 | */ |
4325 | 4343 | $messages['nds-nl'] = array( |
| 4344 | + 'mobile-frontend-desc' => 'Mobiele weergave', |
4326 | 4345 | 'mobile-frontend-search-submit' => 'Artikel', |
4327 | 4346 | 'mobile-frontend-search-results' => 'Zeukresultaoten', |
4328 | 4347 | 'mobile-frontend-no-article-found' => 'Gien artikel evunnen', |
— | — | @@ -4334,20 +4353,45 @@ |
4335 | 4354 | 'mobile-frontend-hide-button' => 'Verbargen', |
4336 | 4355 | 'mobile-frontend-disable-button' => 'Uutschakelen', |
4337 | 4356 | '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', |
4339 | 4358 | 'mobile-frontend-perm-stop-redirect' => 'Altied de standardweergave gebruken', |
4340 | 4359 | '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. |
4342 | 4361 | Wulen hebben al bericht ehad over disse fout en zullen t zo gauw meugelik verhelpen. |
4343 | 4362 | Vorttemee zie'j hier t resultaot.", |
4344 | 4363 | '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.", |
4346 | 4365 | 'mobile-frontend-nav-end' => 'Einde', |
4347 | 4366 | 'mobile-frontend-nav-top' => 'Begin', |
4348 | 4367 | 'mobile-frontend-nav-edit' => 'Bewarken', |
4349 | 4368 | 'mobile-frontend-nav-history' => 'Geschiedenisse', |
4350 | 4369 | 'mobile-frontend-search-text' => 'Zeuken', |
4351 | 4370 | '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 ...', |
4352 | 4396 | ); |
4353 | 4397 | |
4354 | 4398 | /** Nepali (नेपाली) |
— | — | @@ -4856,6 +4900,7 @@ |
4857 | 4901 | 'mobile-frontend-password' => 'Ciav:', |
4858 | 4902 | 'mobile-frontend-login' => 'Intra', |
4859 | 4903 | 'mobile-frontend-placeholder' => 'Anseriss toa arserca ambelessì...', |
| 4904 | + 'mobile-frontend-dismiss-notification' => 'arfuda sta notìfica', |
4860 | 4905 | ); |
4861 | 4906 | |
4862 | 4907 | /** Western Punjabi (پنجابی) |
— | — | @@ -5328,6 +5373,7 @@ |
5329 | 5374 | 'mobile-frontend-password' => 'Пароль:', |
5330 | 5375 | 'mobile-frontend-login' => 'Войти', |
5331 | 5376 | 'mobile-frontend-placeholder' => 'Строка для поиска...', |
| 5377 | + 'mobile-frontend-dismiss-notification' => 'скрыть это уведомление', |
5332 | 5378 | ); |
5333 | 5379 | |
5334 | 5380 | /** Rusyn (Русиньскый) |
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/stylesheets/common.css |
— | — | @@ -289,3 +289,13 @@ |
290 | 290 | padding: 3px; |
291 | 291 | } |
292 | 292 | |
| 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 @@ |
315 | 315 | padding: 3px; |
316 | 316 | } |
317 | 317 | |
| 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 | +} |