r114497 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114496‎ | r114497 | r114498 >
Date:21:41, 26 March 2012
Author:awjrichards
Status:ok
Tags:
Comment:
Syncing to head of origin/master at Change-Id: Ic5b2491485a93909ae2a4c944f7140ed26fc1741
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/DeviceDetection.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/HtmlFormatter.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFormatter.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.i18n.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/api/ApiMobileView.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/api/ApiParseExtender.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/api/ApiQueryExtracts.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_opensearch.js (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/references.js (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/stylesheets/beta_common.css (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/FooterTemplate.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/MobileFrontendTemplate.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/tests/MobileFormatterTest.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/stylesheets/beta_common.css
@@ -141,9 +141,7 @@
142142 border-right-width: 0px;
143143 border-bottom-width: 0px;
144144 border-left-width: 0px;
145 - outline-style: none;
146 - outline-width: initial;
147 - outline-color: initial;
 145+ outline: none;
148146 padding: 0;
149147 font-size: 1.2em;
150148 padding-right: 16px;
@@ -286,12 +284,6 @@
287285 background-color: #f4f4f4;
288286 }
289287
290 -button.show,
291 -button.hide { /* for non-js browsers */
292 - display: none;
293 - overflow: hidden;
294 -}
295 -
296288 .togglingEnabled button.hide,
297289 .togglingEnabled .openSection button.show {
298290 display: none;
@@ -304,6 +296,8 @@
305297
306298 button.show,
307299 button.hide {
 300+ display: none; /* for non-js browsers */
 301+ overflow: hidden;
308302 width: 27px;
309303 height: 16px;
310304 border: none;
@@ -342,10 +336,14 @@
343337 max-height: 0;
344338 position: relative;
345339 overflow: hidden;
346 - -webkit-transition: max-height 0.2s ease-in;
347 - -moz-transition: max-height 0.2s ease-in;
348 - -o-transition: max-height 0.2s ease-in;
349 - transition: max-height 0.2s ease-in;
 340+ -webkit-transition: max-height 0.2s ease-in,
 341+ margin-top 0.2s ease-in; /* for smoother toggling */
 342+ -moz-transition: max-height 0.2s ease-in,
 343+ margin-top 0.2s ease-in;
 344+ -o-transition: max-height 0.2s ease-in,
 345+ margin-top 0.2s ease-in;
 346+ transition: max-height 0.2s ease-in,
 347+ margin-top 0.2s ease-in;
350348 }
351349
352350 .togglingEnabled .openSection.section_anchors {
@@ -569,7 +567,7 @@
570568 }
571569
572570 #content_wrapper p {
573 - margin: 0;
 571+ margin: 0 0 10px 0;
574572 }
575573
576574 #content_wrapper .section {
@@ -750,19 +748,24 @@
751749 -o-transition: all 0.3s ease-in-out;
752750 }
753751
754 -#content_wrapper,
755 -.full-screen-search #results {
756 - opacity: 1;
757 - height: auto;
 752+#results {
 753+ display: none;
 754+ width: 100%;
758755 }
759756
760 -#results,
761757 .full-screen-search #content_wrapper {
762758 height: 0;
763759 overflow: hidden;
764760 opacity: 0;
765761 }
766762
 763+#content_wrapper,
 764+.full-screen-search #results {
 765+ opacity: 1;
 766+ height: auto;
 767+ display: block;
 768+}
 769+
767770 .full-screen-search #footer,
768771 .full-screen-search #zero-rated-banner-red,
769772 .full-screen-search #zero-rated-banner {
@@ -883,12 +886,22 @@
884887 list-style: none;
885888 }
886889
887 -#footer img {
888 - height: 23px;
 890+#footer img.license {
 891+ margin-top: 5px; /* 24px line height - 14px / 2) */
 892+ height: 14px;
 893+}
 894+
 895+#footer .license {
889896 float: left;
890897 margin-right: 4px;
891898 }
892899
 900+html[dir="rtl"] #footer img {
 901+ float: right;
 902+ margin-right: 0px;
 903+ margin-left: 4px;
 904+}
 905+
893906 #footer .toggleCopyright,
894907 #footer .license {
895908 font-weight: bold;
@@ -904,6 +917,13 @@
905918 padding-right: 32px;
906919 }
907920
 921+html[dir="rtl"] #footer .toggleCopyright {
 922+ float: left;
 923+ padding-left: 32px;
 924+ padding-right: 0;
 925+}
 926+
 927+
908928 .toggleCopyright .hide,
909929 .toggleCopyright .show {
910930 position: absolute;
@@ -912,6 +932,12 @@
913933 height: 22px;
914934 }
915935
 936+html[dir="rtl"] .toggleCopyright .hide,
 937+html[dir="rtl"] .toggleCopyright .show {
 938+ right: auto;
 939+ left: 0;
 940+}
 941+
916942 /*
917943 disable animations in footer
918944 this is so that toggling can scroll it into view
@@ -923,15 +949,16 @@
924950 transition: none;
925951 }
926952
927 -.copyrightNotice {
 953+#footer .notice {
928954 padding-top: 8px;
929 - line-height: 1.2em;
 955+ line-height: 1.6em;
930956 margin-bottom: 12px;
931957 }
932958
933959 #content_footer {
934960 text-align: center;
935961 font-size: 0.9em;
 962+ clear: both;
936963 }
937964
938965 #footer .links {
@@ -978,6 +1005,7 @@
9791006 }
9801007 }
9811008
 1009+/* REFERENCES */
9821010 #mf-references {
9831011 -webkit-transition: bottom 0.1s ease-in-out;
9841012 -moz-transition: bottom 0.1s ease-in-out;
@@ -988,7 +1016,7 @@
9891017 left: 0;
9901018 right: 0;
9911019 background-color: #E4E4E4;
992 - padding: 22px;
 1020+ padding: 22px 38px 22px 22px; /* 38px is 22px padding + close button icon 16px */
9931021 -webkit-box-shadow: 0px -20px 10px -16px #aaa;
9941022 -moz-box-shadow: 0px -20px 10px -16px #aaa;
9951023 -o-box-shadow: 0px -20px 10px -16px #aaa;
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -17,15 +17,7 @@
1818
1919 // Define the extension; allows us make sure the extension is used correctly
2020 define( 'MOBILEFRONTEND', 'MobileFrontend' );
21 -// WURFL installation dir
22 -define( 'WURFL_DIR', dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'library' .
23 - DIRECTORY_SEPARATOR . 'WURFL' . DIRECTORY_SEPARATOR );
24 -// WURFL configuration files directory
25 -define( 'RESOURCES_DIR', dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'library' .
26 - DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR );
2721
28 -require_once( WURFL_DIR . 'Application.php' );
29 -
3022 // Extension credits that will show up on Special:Version
3123 $wgExtensionCredits['other'][] = array(
3224 'path' => __FILE__,
@@ -121,6 +113,16 @@
122114 */
123115 $wgMobileRedirectFormAction = false;
124116
 117+/**
 118+ * A string to mark the particular version of a Javascript or CSS resource
 119+ *
 120+ * This is useful to update in order to force invalidation of certain caches
 121+ * when new versions of this software gets deployed, as this string gets
 122+ * appended to the query string in the request for resources, which will
 123+ * invalidate caches dependent on URLs.
 124+ *
 125+ * This is entirely optional.
 126+ */
125127 $wgMobileResourceVersion;
126128
127129 $wgExtMobileFrontend = null;
@@ -160,7 +162,7 @@
161163 * Key for logo.
162164 * Example: array('site' => 'mysite', 'logo' => 'mysite_logo.png');
163165 */
164 -$wgMFCustomLogos = array( array() );
 166+$wgMFCustomLogos = array();
165167
166168 // Unit tests
167169 $wgHooks['UnitTestsList'][] = 'efExtMobileFrontendUnitTests';
@@ -173,6 +175,7 @@
174176 $dir = dirname( __FILE__ ) . '/tests';
175177 $files[] = "$dir/MobileFrontendTest.php";
176178 $files[] = "$dir/DeviceDetectionTest.php";
 179+ $files[] = "$dir/HtmlFormatterTest.php";
177180 $files[] = "$dir/MobileFormatterTest.php";
178181 return true;
179182 }
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/HtmlFormatter.php
@@ -111,9 +111,26 @@
112112 }
113113
114114 /**
 115+ * Checks whether specified element should not be removed due to whitelist
 116+ * @param DOMElement $element: Element to check
 117+ * @return bool
 118+ */
 119+ private function elementNotWhitelisted( DOMElement $element ) {
 120+ $idAttribute = $element->getAttributeNode( 'id' );
 121+ if ( $idAttribute ) {
 122+ $id = $idAttribute->value;
 123+ if ( isset( $this->idWhitelist[$id] ) ) {
 124+ return false;
 125+ }
 126+ }
 127+ return true;
 128+ }
 129+
 130+ /**
115131 * Removes content inappropriate for mobile devices
116132 */
117133 public function filterContent() {
 134+ wfProfileIn( __METHOD__ );
118135 $removals = $this->parseItemsToRemove();
119136
120137 if ( !$removals ) {
@@ -134,15 +151,8 @@
135152 foreach ( $removals['TAG'] as $tagToRemove ) {
136153 $tagToRemoveNodes = $doc->getElementsByTagName( $tagToRemove );
137154 foreach ( $tagToRemoveNodes as $tagToRemoveNode ) {
138 - $tagToRemoveNodeIdAttributeValue = '';
139 - if ( $tagToRemoveNode ) {
140 - $tagToRemoveNodeIdAttribute = $tagToRemoveNode->getAttributeNode( 'id' );
141 - if ( $tagToRemoveNodeIdAttribute ) {
142 - $tagToRemoveNodeIdAttributeValue = $tagToRemoveNodeIdAttribute->value;
143 - }
144 - if ( !isset( $this->idWhitelist[$tagToRemoveNodeIdAttributeValue] ) ) {
145 - $domElemsToRemove[] = $tagToRemoveNode;
146 - }
 155+ if ( $tagToRemoveNode && $this->elementNotWhitelisted( $tagToRemoveNode ) ) {
 156+ $domElemsToRemove[] = $tagToRemoveNode;
147157 }
148158 }
149159 }
@@ -165,7 +175,9 @@
166176 $elements = $xpath->query( '//*[@class="' . $classToRemove . '"]' );
167177
168178 foreach ( $elements as $element ) {
169 - $element->parentNode->removeChild( $element );
 179+ if ( $element->parentNode && $this->elementNotWhitelisted( $element ) ) {
 180+ $element->parentNode->removeChild( $element );
 181+ }
170182 }
171183 }
172184
@@ -178,7 +190,9 @@
179191 );
180192
181193 foreach ( $elements as $element ) {
182 - $removedElement = $element->parentNode->removeChild( $element );
 194+ if ( $element->parentNode && $this->elementNotWhitelisted( $element ) ) {
 195+ $element->parentNode->removeChild( $element );
 196+ }
183197 }
184198 }
185199
@@ -191,7 +205,7 @@
192206
193207 if ( $redLink->hasAttributes() ) {
194208 $attributes = $redLink->attributes;
195 - foreach ( $attributes as $i => $attribute ) {
 209+ foreach ( $attributes as $attribute ) {
196210 if ( $attribute->name != 'href' ) {
197211 $spanNode->setAttribute( $attribute->name, $attribute->value );
198212 }
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/MobileFrontendTemplate.php
@@ -48,4 +48,16 @@
4949 * to show the actual HTML output
5050 */
5151 abstract public function getHTML();
 52+
 53+ /**
 54+ * Intended to override things like $skin->privacyLink() for custom link
 55+ * text of internal MW-generated links
 56+ * @param object Skin object
 57+ * @param string Mediawiki message key denoting the text of the link
 58+ * @param string Mediawiki message key denoting the page the link should point to
 59+ * @return string
 60+ */
 61+ public function getCustomFooterLink( $skin, $linkText, $page ) {
 62+ return $skin->footerLink( $linkText, $page );
 63+ }
5264 }
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/FooterTemplate.php
@@ -9,7 +9,9 @@
1010 public function getHTML() {
1111
1212 $regularSite = $this->data['messages']['mobile-frontend-regular-site'];
13 - $copyright = $this->data['messages']['mobile-frontend-copyright'];
 13+ $copyright = $this->data['messages']['mobile-frontend-footer-copyright'];
 14+ $copyrightSymbol = $this->data['copyright-symbol'];
 15+ $license = $this->data['messages']['mobile-frontend-footer-license'];
1416 $disableImages = $this->data['messages']['mobile-frontend-disable-images'];
1517 $enableImages = $this->data['messages']['mobile-frontend-enable-images'];
1618 $leaveFeedback = $this->data['messages']['mobile-frontend-leave-feedback'];
@@ -34,8 +36,8 @@
3537
3638 $skin = RequestContext::getMain()->getSkin();
3739 $disclaimerLink = $skin->disclaimerLink();
38 - $privacyLink = $skin->privacyLink();
39 - $aboutLink = $skin->aboutLink();
 40+ $privacyLink = $this->getCustomFooterLink( $skin, 'mobile-frontend-privacy-link-text', 'privacypage' );
 41+ $aboutLink = $this->getCustomFooterLink( $skin, 'mobile-frontend-about-link-text', 'aboutpage' );
4042
4143 $normalFooter = <<<HTML
4244 <div class='nav' id='footmenu'>
@@ -45,21 +47,31 @@
4648 </div>
4749 <div id='copyright'>{$copyright}</div>
4850 HTML;
 51+ if( $this->data['copyright-has-logo'] ) {
 52+ $licenseHTML = <<<HTML
 53+ <img src="{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/images/logo-copyright-{$this->data['language-code']}.png"
 54+ class="license" alt="{$this->data['messages']['mobile-frontend-footer-sitename']} {$copyrightSymbol}">
 55+HTML;
 56+ } else {
 57+ $licenseHTML = <<<HTML
 58+ <div class="license">{$this->data['messages']['mobile-frontend-footer-sitename']} {$copyrightSymbol}</div>
 59+HTML;
 60+ }
 61+
 62+
4963 $betaFooter = <<<HTML
5064 <!-- TODO: make license icon and text dynamic -->
51 - <img src="{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/images/ccommons.png" alt="creative commons"
52 - class='license' />
53 - <a href="http://creativecommons.org/licenses/by-sa/3.0/" class="license">by SA 3.0</a>
 65+ {$licenseHTML}
5466 <a href="#content_footer" class="toggleCopyright section_heading" id="section_footer">
55 - <span class="more">more information</span><span class="less">less information</span>
 67+ <span class="more">{$this->data['messages']['mobile-frontend-footer-more']}</span><span class="less">{$this->data['messages']['mobile-frontend-footer-less']}</span>
5668 </a>
5769 <div class="content_block" id="content_footer">
58 - <div class="copyrightNotice">
59 - {$copyright}
 70+ <div class="notice">
 71+ {$license}
6072 </div>
6173 <ul class='links'>
6274 <li>
63 - <a href="{$this->data['leaveFeedbackURL']}">Contact</a>
 75+ <a href="{$this->data['leaveFeedbackURL']}">{$this->data['messages']['mobile-frontend-footer-contact']}</a>
6476 </li><li>
6577 {$privacyLink}
6678 </li><li>
@@ -77,6 +89,6 @@
7890 </div>
7991
8092 HTML;
81 - return $footerHtml;
 93+ return $footerHtml;
 94+ }
8295 }
83 -}
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
@@ -74,7 +74,7 @@
7575 <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version={$wgMobileResourceVersion}' media='all' rel='Stylesheet' type='text/css' />
7676 <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version={$wgMobileResourceVersion}' media='all' rel='Stylesheet' type='text/css' />
7777 {$filePageStyle}
78 - <meta name="viewport" content="initial-scale=1.0">
 78+ <meta name="viewport" content="initial-scale=1.0, user-scalable=yes">
7979 {$appleTouchIconTag}
8080 {$jQueryScript}
8181 <script type="text/javascript">
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFormatter.php
@@ -169,7 +169,7 @@
170170 $this->headings++;
171171
172172 $base = self::WML_SECTION_SEPARATOR .
173 - "<h2 class='section_heading' id='section_{$this->headings}'>{$this->matches[2]}</h2>";
 173+ "<h2 class='section_heading' id='section_{$this->headings}'>{$matches[2]}</h2>";
174174
175175 wfProfileOut( __METHOD__ );
176176 return $base;
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/tests/MobileFormatterTest.php
@@ -20,9 +20,6 @@
2121 }
2222
2323 public function getXhtmlData() {
24 - $disableImages = function( MobileFormatter $mf ) {
25 - $mf->removeImages();
26 - };
2724 return array(
2825 // down with infoboxes
2926 array(
@@ -37,12 +34,6 @@
3835 Foobar!</div></div></div>',
3936 '<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="https://www.mediawiki.org/wiki/File:Foo.jpg" class="image"><img alt="" src="/foo.jpg" width="220" height="165" class="thumbimage"></img></a><div class="thumbcaption">Foobar!</div></div></div>',
4037 ),
41 - // remove images if asked
42 - array(
43 - '<img src="/foo/bar.jpg">Blah</img>',
44 - 'Blah',
45 - $disableImages,
46 - ),
4738 );
4839 }
4940 }
\ No newline at end of file
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/DeviceDetection.php
@@ -322,7 +322,7 @@
323323
324324 if ( $formatName === '' ) {
325325 if ( strpos( $acceptHeader, 'application/vnd.wap.xhtml+xml' ) !== false ) {
326 - // Should be wap2 or in WURFL xhtmlmp
 326+ // Should be wap2
327327 $formatName = 'html';
328328 } elseif ( strpos( $acceptHeader, 'vnd.wap.wml' ) !== false ) {
329329 $formatName = 'wml';
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
@@ -113,6 +113,11 @@
114114 'mobile-frontend-dismiss-notification',
115115 'mobile-frontend-sopa-notice',
116116 'mobile-frontend-clear-search',
 117+ 'mobile-frontend-footer-more',
 118+ 'mobile-frontend-footer-less',
 119+ 'mobile-frontend-footer-contact',
 120+ 'mobile-frontend-footer-sitename',
 121+ 'mobile-frontend-footer-license',
117122 );
118123
119124 public function __construct() {
@@ -181,13 +186,13 @@
182187 $output->setSquidMaxage( 1200 );
183188 $output->redirect( $targetUrl, '301' );
184189 }
185 - return false; // Prevent the redirect from occuring
 190+ return false; // Prevent the redirect from occurring
186191 }
187192 }
188193
189194 /**
190195 * @param $obj Article
191 - * @param $tpl
 196+ * @param $tpl MobileFrontendTemplate
192197 * @return bool
193198 */
194199 public function addMobileFooter( &$obj, &$tpl ) {
@@ -226,7 +231,7 @@
227232 }
228233
229234 public function getMsg() {
230 - global $wgUser, $wgContLang, $wgRequest, $wgServer, $wgMobileRedirectFormAction, $wgOut, $wgLanguageCode;
 235+ global $wgContLang, $wgRequest, $wgServer, $wgMobileRedirectFormAction, $wgOut, $wgLanguageCode;
231236 wfProfileIn( __METHOD__ );
232237
233238 self::$disableImagesURL = $wgRequest->escapeAppendQuery( 'disableImages=1' );
@@ -267,7 +272,7 @@
268273 $languageUrls[] = array(
269274 'href' => self::$currentURL,
270275 'text' => self::$htmlTitle,
271 - 'language' => $wgContLang->getLanguageName( $wgLanguageCode ),
 276+ 'language' => Language::fetchLanguageName( $wgLanguageCode ),
272277 'class' => 'interwiki-' . $wgLanguageCode,
273278 'lang' => $wgLanguageCode,
274279 );
@@ -282,10 +287,10 @@
283288 $languageUrl = $this->getMobileUrl( $nt->getFullURL() );
284289 $languageUrls[] = array(
285290 'href' => $languageUrl,
286 - 'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != ''
287 - ? $wgContLang->getLanguageName( $nt->getInterwiki() )
 291+ 'text' => ( Language::fetchLanguageName( $nt->getInterwiki() ) != ''
 292+ ? Language::fetchLanguageName( $nt->getInterwiki() )
288293 : $l ),
289 - 'language' => $wgContLang->getLanguageName( $lang ),
 294+ 'language' => Language::fetchLanguageName( $lang ),
290295 'class' => $class,
291296 'lang' => $lang,
292297 );
@@ -340,7 +345,7 @@
341346 * @return bool
342347 */
343348 public function beforePageDisplayHTML( &$out, &$text ) {
344 - global $wgContLang, $wgRequest, $wgMemc, $wgUser;
 349+ global $wgRequest, $wgUser;
345350 wfProfileIn( __METHOD__ );
346351
347352 // Note: The WebRequest Class calls are made in this block because
@@ -362,32 +367,6 @@
363368
364369 $userAgent = $_SERVER['HTTP_USER_AGENT'];
365370 $acceptHeader = isset( $_SERVER["HTTP_ACCEPT"] ) ? $_SERVER["HTTP_ACCEPT"] : '';
366 - $uAmd5 = md5( $userAgent );
367 -
368 - $key = wfMemcKey( 'mobile', 'ua', $uAmd5 );
369 -
370 - $props = null;
371 - try {
372 - $props = $wgMemc->get( $key );
373 - if ( !$props ) {
374 - $wurflConfigFile = RESOURCES_DIR . 'wurfl-config.xml';
375 - $wurflConfig = new WURFL_Configuration_XmlConfig( $wurflConfigFile );
376 - $wurflManagerFactory = new WURFL_WURFLManagerFactory( $wurflConfig );
377 - $wurflManager = $wurflManagerFactory->create();
378 - $device = $wurflManager->getDeviceForHttpRequest( $_SERVER );
379 -
380 - if ( $device->isSpecific() === true ) {
381 - $props = $device->getAllCapabilities();
382 - $wgMemc->set( $key, $props, 86400 );
383 - } else {
384 - $wgMemc->set( $key, 'generic', 86400 );
385 - $props = 'generic';
386 - }
387 - }
388 - } catch ( Exception $e ) {
389 - // echo $e->getMessage();
390 - }
391 -
392371 self::$title = $out->getTitle();
393372
394373 if ( self::$title->isMainPage() ) {
@@ -606,6 +585,7 @@
607586
608587 /**
609588 * @param $value string
 589+ * @return bool
610590 */
611591 private function setOptInOutCookie( $value ) {
612592 global $wgCookieDomain, $wgRequest, $wgCookiePrefix;
@@ -669,6 +649,7 @@
670650
671651 /**
672652 * Disables caching if the request is coming from a trusted proxy
 653+ * @return bool
673654 */
674655 private function disableCaching() {
675656 global $wgRequest;
@@ -750,7 +731,7 @@
751732 $leaveFeedbackTemplate = new LeaveFeedbackTemplate();
752733 $options = array(
753734 'feedbackPostURL' => str_replace( '&mobileaction=leave_feedback', '', $wgRequest->getFullRequestURL() ) . '&mobileaction=leave_feedback_post',
754 - 'editToken' => $wgUser->editToken(),
 735+ 'editToken' => $wgUser->getEditToken(),
755736 'title' => self::$messages['mobile-frontend-leave-feedback-title'],
756737 'notice' => self::$messages['mobile-frontend-leave-feedback-notice'],
757738 'subject' => self::$messages['mobile-frontend-leave-feedback-subject'],
@@ -914,8 +895,9 @@
915896 Html::closeElement( 'table' ) .
916897 Html::input( 'wpLoginToken', self::$wsLoginToken, 'hidden' ) .
917898 Html::closeElement( 'form' );
 899+ $result = $this->getDomDocumentNodeByTagName( $form, 'form' );
918900 wfProfileOut( __METHOD__ );
919 - return $this->getDomDocumentNodeByTagName( $form, 'form' );
 901+ return $result;
920902 }
921903
922904 /**
@@ -1027,7 +1009,6 @@
10281010
10291011 wfProfileIn( __METHOD__ . '-getText' );
10301012 $formatter->setIsMainPage( self::$isMainPage );
1031 - $prepend = '';
10321013 if ( $this->contentFormat == 'XHTML'
10331014 && self::$device['supports_javascript'] === true
10341015 && empty( self::$search ) )
@@ -1037,9 +1018,8 @@
10381019 $contentHtml = $formatter->getText( 'content' );
10391020 wfProfileOut( __METHOD__ . '-getText' );
10401021
1041 - $htmlTitle = htmlspecialchars( self::$htmlTitle );
1042 -
10431022 wfProfileIn( __METHOD__ . '-templates' );
 1023+ $htmlTitle = htmlspecialchars( self::$htmlTitle );
10441024 if ( $this->contentFormat == 'WML' ) {
10451025 header( 'Content-Type: text/vnd.wap.wml' );
10461026
@@ -1123,7 +1103,7 @@
11241104 }
11251105
11261106 public function getFooterTemplate() {
1127 - global $wgExtensionAssetsPath;
 1107+ global $wgExtensionAssetsPath, $wgLanguageCode;
11281108 wfProfileIn( __METHOD__ );
11291109 $footerTemplate = new FooterTemplate();
11301110 $logoutHtml = ( self::$logoutHtml ) ? self::$logoutHtml : '';
@@ -1138,6 +1118,9 @@
11391119 'logoutHtml' => $logoutHtml,
11401120 'loginHtml' => $loginHtml,
11411121 'code' => self::$code,
 1122+ 'language-code' => 'en',
 1123+ 'copyright-symbol' => $wgLanguageCode === 'en' ? '®': '™',
 1124+ 'copyright-has-logo' => $wgLanguageCode === 'en',
11421125 'hideFooter' => self::$hideFooter,
11431126 'wgExtensionAssetsPath' => $wgExtensionAssetsPath,
11441127 'isBetaGroupMember' => self::$isBetaGroupMember,
@@ -1251,7 +1234,7 @@
12521235 'remoteExtPath' => 'MobileFrontend',
12531236 );
12541237 $testModules['qunit']['ext.mobilefrontend.tests.beta'] = array(
1255 - 'scripts' => array( 'tests/js/fixtures.js', 'javascripts/beta_application.js',
 1238+ 'scripts' => array( 'tests/js/fixtures.js', 'javascripts/application.js',
12561239 'javascripts/beta_opensearch.js', 'tests/js/test_beta_opensearch.js' ),
12571240 'dependencies' => array( ),
12581241 'localBasePath' => dirname( __FILE__ ),
@@ -1263,6 +1246,7 @@
12641247 /**
12651248 * Take a URL and return a copy that conforms to the mobile URL template
12661249 * @param $url string
 1250+ * @param $forceHttps bool
12671251 * @return string
12681252 */
12691253 public function getMobileUrl( $url, $forceHttps = false ) {
@@ -1532,10 +1516,10 @@
15331517 * This cookie can determine whether or not a user should see the mobile
15341518 * version of pages.
15351519 *
1536 - * @param string The format to store in the cookie
 1520+ * @param string $useFormat The format to store in the cookie
15371521 */
15381522 protected function setUseFormatCookie( $useFormat ) {
1539 - global $wgRequest, $wgCookiePath, $wgCookieSecure, $wgCookieDomain;
 1523+ global $wgCookiePath, $wgCookieSecure, $wgCookieDomain;
15401524 $expiry = $this->getUseFormatCookieExpiry();
15411525
15421526 // use regular php setcookie() rather than WebResponse::setCookie
@@ -1548,11 +1532,11 @@
15491533 /**
15501534 * Get the expiration time for the mf_useformat cookie
15511535 *
1552 - * @param int The base time (in seconds since Epoch) from which to calculate
 1536+ * @param int $startTime The base time (in seconds since Epoch) from which to calculate
15531537 * cookie expiration. If null, time() is used.
15541538 * @return int The time (in seconds since Epoch) that the cookie should expire
15551539 */
1556 - protected function getUseFormatCookieExpiry( $startTime=null ) {
 1540+ protected function getUseFormatCookieExpiry( $startTime = null ) {
15571541 $cookieDuration = $this->getUseFormatCookieDuration();
15581542 if ( intval( $startTime ) === 0 ) $startTime = time();
15591543 $expiry = $startTime + $cookieDuration;
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/api/ApiMobileView.php
@@ -65,6 +65,7 @@
6666 }
6767 $this->getResult()->setIndexedTagName( $result, 'section' );
6868 $this->getResult()->addValue( null, $this->getModuleName(), array( 'sections' => $result ) );
 69+ wfProfileOut( __METHOD__ );
6970 }
7071
7172 private function parseSections( $str ) {
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/api/ApiQueryExtracts.php
@@ -80,6 +80,7 @@
8181 'action' => 'query',
8282 'prop' => 'extracts',
8383 'explaintext' => true,
 84+ 'exintro' => true,
8485 'exlimit' => count( $results ),
8586 'pageids' => implode( '|', $pageIds ),
8687 ) )
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/api/ApiParseExtender.php
@@ -9,6 +9,7 @@
1010 * @see https://www.mediawiki.org/wiki/Manual:Hooks/APIGetAllowedParams
1111 * @param ApiBase $module
1212 * @param array|bool $params
 13+ * @return bool
1314 */
1415 public static function onAPIGetAllowedParams( ApiBase &$module, &$params ) {
1516 if ( $module->getModuleName() == 'parse' ) {
@@ -26,6 +27,7 @@
2728 * @see: https://www.mediawiki.org/wiki/Manual:Hooks/APIGetParamDescription
2829 * @param ApiBase $module
2930 * @param Array|bool $params
 31+ * @return bool
3032 */
3133 public static function onAPIGetParamDescription( ApiBase &$module, &$params ) {
3234 if ( $module->getModuleName() == 'parse' ) {
@@ -41,6 +43,7 @@
4244 * @see: https://www.mediawiki.org/wiki/Manual:Hooks/APIGetDescription
4345 * @param ApiBase $module
4446 * @param Array|string $desc
 47+ * @return bool
4548 */
4649 public static function onAPIGetDescription( ApiBase &$module, &$desc ) {
4750 if ( $module->getModuleName() == 'parse' ) {
@@ -54,6 +57,7 @@
5558 * APIAfterExecute hook handler
5659 * @see: https://www.mediawiki.org/wiki/Manual:Hooks/
5760 * @param ApiBase $module
 61+ * @return bool
5862 */
5963 public static function onAPIAfterExecute( ApiBase &$module ) {
6064 if ( $module->getModuleName() == 'parse' ) {
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/references.js
@@ -1,6 +1,6 @@
22 if( typeof jQuery !== 'undefined' ) {
33 MobileFrontend.references = (function($) {
4 - var calculatePosition, hashtest, options = {};
 4+ var calculatePosition = function() {}, hashtest, options = {}, wasVisible;
55
66 hashtest = window.location.hash.substr(1).match(/refspeed:([0-9]*)/);
77 options.animationSpeed = hashtest ? parseInt( hashtest[1], 10 ) : 500;
@@ -11,8 +11,7 @@
1212 var references = {};
1313 $( 'ol.references li' ).each(function(i, el) {
1414 references[ $(el).attr( 'id' ) ] = {
15 - html: $(el).html(),
16 - label: i + 1
 15+ html: $(el).html()
1716 };
1817 });
1918 return references;
@@ -21,18 +20,39 @@
2221 // TODO: only apply to places that need it
2322 // http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html
2423 // https://github.com/Modernizr/Modernizr/issues/167
25 - calculatePosition = function() {
26 - var h = $( '#mf-references' ).outerHeight();
27 - $( '#mf-references' ).css( {
28 - top: ( window.innerHeight + window.pageYOffset ) - h,
29 - bottom: 'auto',
30 - position: 'absolute'
31 - } );
32 - };
33 - $( document ).scroll(calculatePosition);
 24+ function supportsPositionFixed() {
 25+ // TODO: don't use device detection
 26+ var agent = navigator.userAgent;
 27+ // match anything over Webkit 534
 28+ return agent.match( /AppleWebKit\/(53[4-9]|5[4-9]\d?|[6-9])\d?\d?/ ) ? true : false;
 29+ }
 30+ if( !supportsPositionFixed() ) {
 31+ calculatePosition = function() {
 32+ var h = $( '#mf-references' ).outerHeight();
 33+ $( '#mf-references' ).css( {
 34+ top: ( window.innerHeight + window.pageYOffset ) - h,
 35+ bottom: 'auto',
 36+ position: 'absolute'
 37+ } );
 38+ };
 39+ $( document ).scroll(calculatePosition);
 40+ document.body.ontouchstart = function() {
 41+ wasVisible = $( '#mf-references' ).is( ':visible' );
 42+ $( '#mf-references' ).hide();
 43+ };
 44+ document.body.ontouchend = function() {
 45+ if( wasVisible ) {
 46+ $( '#mf-references' ).show();
 47+ }
 48+ };
 49+ }
3450
3551 function init() {
36 - $( '<div id="mf-references"><div></div></div>' ).hide().appendTo( document.body );
 52+ var el = $( '<div id="mf-references"><div></div></div>' ).hide().appendTo( document.body )[0];
 53+ function cancelBubble( ev ) {
 54+ ev.stopPropagation();
 55+ }
 56+ el.ontouchstart = cancelBubble;
3757 var close = function() {
3858 var top;
3959 lastLink = null;
@@ -44,12 +64,11 @@
4565 } else {
4666 $( '#mf-references' ).fadeOut( options.animationSpeed );
4767 }
48 - }, lastLink;
 68+ }, lastLink, data, html, href, references = collect();
4969 $( '<button>close</button>' ).click( close ).appendTo( '#mf-references' );
5070 $( '.mw-cite-backlink a' ).click( close );
51 -
52 - var data, html, href, references = collect();
53 - $( 'sup a' ).unbind('click').click( function(ev) {
 71+
 72+ function clickReference(ev) {
5473 var top, oh;
5574 href = $(this).attr( 'href' );
5675 data = href && href.charAt(0) === '#' ?
@@ -58,12 +77,13 @@
5978 if( !$("#mf-references").is(":visible") || lastLink !== href) {
6079 lastLink = href;
6180 if( data ) {
62 - html = '<h3>[' + data.label + ']</h3>' + data.html;
 81+ html = '<h3>' + $(this).text() + '</h3>' + data.html;
6382 } else {
6483 html = $( '<a />' ).text( $(this).text() ).
6584 attr( 'href', href ).appendTo('<div />').parent().html();
6685 }
6786 $( '#mf-references div' ).html( html );
 87+ $('#mf-references div sup a').click( clickReference );
6888 calculatePosition();
6989 if( options.animation === 'none' ) {
7090 $( '#mf-references' ).show();
@@ -79,8 +99,11 @@
80100 close();
81101 }
82102 ev.preventDefault();
 103+ }
 104+ $( 'sup a' ).unbind('click').click( clickReference ).each(function(i, el) {
 105+ el.ontouchstart = cancelBubble;
83106 });
84107 }
85108 init();
86 - })(jQuery);
87 -}
\ No newline at end of file
 109+ }(jQuery));
 110+}
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/javascripts/beta_opensearch.js
@@ -14,34 +14,12 @@
1515
1616 apiUrl = MobileFrontend.setting( 'scriptPath' ) + apiUrl;
1717
18 - function hideResults() {
19 - results.style.display = 'none';
20 - }
21 -
22 - viewportmeta = u( 'meta[name="viewport"]' )
23 - if ( viewportmeta ) {
24 - viewportmeta = viewportmeta[0];
25 - originalViewport = viewportmeta.getAttribute( 'content' );
26 - }
27 - // prevent auto-zoom in on clicking search for certain browsers e.g. palm pre and ipad
28 - function resetViewPort() {
29 - if ( viewportmeta ) {
30 - viewportmeta.setAttribute( 'content', 'minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0');
31 - u( document.body ).bind( 'gesturestart', function () {
32 - viewportmeta.setAttribute( 'content', originalViewport );
33 - } );
34 - }
35 - }
36 -
37 - resetViewPort();
38 -
3918 search.onfocus = function() {
4019 var rrd, rrdD;
4120 sb = document.getElementById( 'searchbox' );
4221 header = document.getElementById( 'header' );
4322 content = document.getElementById( 'content' );
4423 footer = document.getElementById( 'footer' );
45 - resetViewPort();
4624
4725 if ( !focused ) {
4826 MobileFrontend.utils( document.body ).addClass( 'full-screen-search' );
@@ -69,56 +47,35 @@
7048 }
7149 }
7250
73 - function whichElement( e ) {
74 - var targ;
75 - if ( !e ) {
76 - e = window.event;
77 - }
78 - if ( e.target ) {
79 - targ = e.target;
80 - } else if ( e.srcElement ) {
81 - targ = e.srcElement;
82 - }
83 -
84 - if ( targ.nodeType === 3 ) {
85 - targ = targ.parentNode;
86 - }
87 -
88 - e.cancelBubble = true;
89 - e.stopPropagation();
90 - if ( targ.className === "suggestion-result" ||
91 - targ.className === "search-result-item" ||
92 - targ.className === "suggestions-result" ||
93 - targ.className === "sq-val-update" ||
94 - targ.id === 'results' ||
95 - targ.id === 'search' ||
96 - targ.id === 'searchbox' ||
97 - targ.id === 'sq' ||
98 - targ.id === 'placeholder' ||
99 - targ.id === 'clearsearch' ||
100 - targ.tagName === 'BODY' ) {
101 - if ( targ.id === 'clearsearch' && results ) {
102 - results.innerHTML = '';
103 - }
104 - } else {
105 - hideResults();
106 - }
107 - }
108 -
10951 var performSearch = function(ev) {
110 - ev.preventDefault();
 52+ if( ev ) {
 53+ ev.preventDefault();
 54+ }
11155 clearTimeout( timer );
11256 term = search.value;
113 - if ( term.length < 1 ) {
114 - results.innerHTML = '';
115 - } else {
 57+ if ( term.length > 1 ) {
11658 term = encodeURIComponent( term );
11759 timer = setTimeout( function () { searchApi( term ); }, typingDelay );
11860 }
11961 };
120 - u( search ).bind( 'keyup', performSearch );
 62+ var oldValue;
 63+ window.setInterval(function() {
 64+ var value = search.value;
 65+ if( value.length > 1 && value !== oldValue ) {
 66+ oldValue = value;
 67+ performSearch();
 68+ }
 69+ }, typingDelay);
 70+
12171 u( document.getElementById( 'searchForm' ) ).bind( 'submit', performSearch );
122 - u( search ).bind( 'blur', performSearch ); // for opera mini etc
 72+ function blurSearch(ev) {
 73+ if( search.value.length === 0) {
 74+ removeResults();
 75+ } else {
 76+ performSearch(ev); // for opera mini etc
 77+ }
 78+ }
 79+ u( search ).bind( 'blur', blurSearch );
12380
12481 function searchApi( term ) {
12582 u( search ).addClass( 'searching' );
@@ -163,7 +120,6 @@
164121 term = htmlEntities( document.getElementById( 'search' ).value ),
165122 section, escapedTerm, suggestionsResult, link, label;
166123
167 - results.style.display = 'block';
168124 if ( search ) {
169125 search.focus();
170126 }
@@ -206,6 +162,7 @@
207163
208164 function clearSearchBox( event ) {
209165 search.value = '';
 166+ results.innerHTML = '';
210167 event.preventDefault();
211168 }
212169
@@ -217,11 +174,6 @@
218175 }
219176
220177 function init() {
221 - var results = document.getElementById( 'results' );
222 - results.onmousedown = whichElement;
223 - document.body.onmousedown = whichElement;
224 - document.body.ontouchstart = whichElement;
225 - results.ontouchstart = whichElement;
226178 }
227179 init();
228180 initClearSearch();
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.i18n.php
@@ -75,6 +75,13 @@
7676 'mobile-frontend-dismiss-notification' => 'dismiss this notification',
7777 'mobile-frontend-sopa-notice' => '<h3 id="sopa-notice">Thank you for protecting Wikipedia.</h3><br/><a href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Mobile_Learn_more">(We’re not done yet.)</a>',
7878 'mobile-frontend-clear-search' => 'Clear',
 79+ 'mobile-frontend-privacy-link-text' => 'Privacy',
 80+ 'mobile-frontend-about-link-text' => 'About',
 81+ 'mobile-frontend-footer-more' => 'more',
 82+ 'mobile-frontend-footer-less' => 'less',
 83+ 'mobile-frontend-footer-sitename' => 'Wikipedia',
 84+ 'mobile-frontend-footer-license' => 'Content available under <a href="http://wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License?useformat=mobile">CC BY-SA 3.0</a><br><a href="https://www.mediawiki.org//wikimediafoundation.org/wiki/Terms_of_use?useformat=mobile">Terms of Use</a>',
 85+ 'mobile-frontend-footer-contact' => 'Contact',
7986 );
8087
8188 /** Message documentation (Message documentation)
@@ -113,6 +120,13 @@
114121 'mobile-frontend-placeholder' => 'Phrase used to prompt user to use search interface for mobile full screen search',
115122 'mobile-frontend-dismiss-notification' => 'Phrase used to dismiss the top banner notification',
116123 'mobile-frontend-clear-search' => 'Tooltip for clear button that appears when you type into search box',
 124+ 'mobile-frontend-privacy-link-text' => 'Custom version of "Privacy policy" link text for mobile footer, intended to be as brief as possible to take up as little screen real estate as possible',
 125+ 'mobile-frontend-about-link-text' => 'Custom version of "About {{Sitename}}" link text for mobile footer, intended to be as brief as possible to take up as little screen real estate as possible',
 126+ 'mobile-frontend-footer-more' => 'Label for more button in footer',
 127+ 'mobile-frontend-footer-less' => 'Label for less button in footer',
 128+ 'mobile-frontend-footer-contact' => 'Label for contact in footer',
 129+ 'mobile-frontend-footer-sitename' => 'Name of site',
 130+ 'mobile-frontend-footer-license' => 'License shown in footer',
117131 );
118132
119133 /** Ṫuroyo (Ṫuroyo)
@@ -3126,13 +3140,13 @@
31273141 'mobile-frontend-wml-back' => 'Indietro ...',
31283142 'mobile-frontend-view' => 'Versione mobile',
31293143 'mobile-frontend-opt-in-message' => 'Vuoi provare la versione beta per mobile?',
3130 - 'mobile-frontend-opt-in-yes-button' => 'sì',
3131 - 'mobile-frontend-opt-in-no-button' => 'no',
 3144+ 'mobile-frontend-opt-in-yes-button' => 'Sì',
 3145+ 'mobile-frontend-opt-in-no-button' => 'No',
31323146 'mobile-frontend-opt-in-title' => 'Partecipazione al collaudo',
31333147 'mobile-frontend-opt-in-explain' => 'Partecipando alla versione di prova avrai la possibilità di usare funzionalità sperimentali, ma con il rischio di incontrare errori e problemi.',
31343148 'mobile-frontend-opt-out-message' => 'Abbandonare la versione beta per mobile?',
3135 - 'mobile-frontend-opt-out-yes-button' => 'sì',
3136 - 'mobile-frontend-opt-out-no-button' => 'no',
 3149+ 'mobile-frontend-opt-out-yes-button' => 'Sì',
 3150+ 'mobile-frontend-opt-out-no-button' => 'No',
31373151 'mobile-frontend-opt-out-title' => 'Abbandono del collaudo',
31383152 'mobile-frontend-opt-out-explain' => 'Qui puoi abbandonare la prova',
31393153 'mobile-frontend-disable-images' => 'Disabilita le immagini sul sito per dispositivi mobili',
@@ -3355,7 +3369,7 @@
33563370 'mobile-frontend-search-results' => 'លទ្ធផលស្វែងរក',
33573371 'mobile-frontend-no-article-found' => 'រកមិនឃើញអត្ថបទ',
33583372 'mobile-frontend-featured-article' => 'អត្ថបទពិសេសសំរាប់ថ្ងៃនេះ',
3359 - 'mobile-frontend-in-the-news' => 'នៅក្នុងសារពត៌មាន',
 3373+ 'mobile-frontend-in-the-news' => 'នៅក្នុងសារព័ត៌មាន',
33603374 'mobile-frontend-home-button' => 'ទំព័រដើម',
33613375 'mobile-frontend-random-button' => 'ចៃដន្យ',
33623376 'mobile-frontend-back-to-top-of-section' => 'លោតត្រលប់ទៅផ្នែកខាងលើរបស់ផ្នែកនេះ',
@@ -3363,18 +3377,18 @@
33643378 'mobile-frontend-hide-button' => 'លាក់',
33653379 'mobile-frontend-disable-button' => 'ឈប់ប្រើ',
33663380 'mobile-frontend-back-button' => 'ត្រលប់ក្រោយ',
3367 - 'mobile-frontend-regular-site' => 'បើកមើលទំព័រនេះនៅលើ{{SITENAME}}ធម្មតា',
 3381+ 'mobile-frontend-regular-site' => 'បើកមើលលើផ្ទៃអេក្រង់លើតុ',
33683382 'mobile-frontend-error-page-title' => 'យើងមានបញ្ហាហើយ!',
33693383 'mobile-frontend-error-page-text' => '{{SITENAME}} ចល័តកំពុងស្ថិតក្រោមការអភិវឌ្ឍន៍​យ៉ាងសកម្ម ហើយយើងខ្ញុំកំពុង​ប្រឹងប្រែងយ៉ាងខ្លាំងក្លា​ក្នុងការកែប្រែកំហុសផ្ទៃក្នុងទាំងឡាយ។ យើងខ្ញុំទទួលការប្រាប់ព័ត៌មាន​អំពីកំហុសទាំងនោះ​ហើយយើងខ្ញុំនឹង​ធ្វើការកែប្រែវានាពេលឆាប់ៗនេះ។ សូមត្រលប់មកពិនិត្យមើលម្ដងទៀត!',
33703384 'mobile-frontend-are-you-sure' => 'តើអ្នកប្រាកដហើយ?',
3371 - 'mobile-frontend-explain-disable' => 'តើអ្នកពិតជាចង់ឈប់ប្រើវើសិនសំរាប់ទូរស័ព្ទចល័តរបស់{{SITENAME}}មែនទេ? ប្រើសិនបើអ្នកជ្រើសយក <b>ឈប់ប្រើ</b> នោះចាប់ពីពេលនេះទៅ នៅពេលដែលអ្នកចូលមើល{{SITENAME}} អ្នកនឹងមិនត្រូវបញ្ជូនផ្ទាល់​ទៅកាន់ទំរង់សំរាប់ទូរស័ព្ទចល័តរបស់{{SITENAME}}ទេ។',
 3385+ 'mobile-frontend-explain-disable' => 'តើអ្នកពិតជាចង់ឈប់ប្រើវើសិនសំរាប់ទូរស័ព្ទចល័តរបស់{{SITENAME}}មែនទេ? ប្រសិនបើអ្នកជ្រើសយក <b>ឈប់ប្រើ</b> នោះចាប់ពីពេលនេះទៅ នៅពេលដែលអ្នកចូលមើល{{SITENAME}} អ្នកនឹងមិនត្រូវបញ្ជូនផ្ទាល់​ទៅកាន់ទំរង់សំរាប់ទូរស័ព្ទចល័តរបស់{{SITENAME}}ទេ។',
33723386 'mobile-frontend-nav-end' => 'ចប់',
33733387 'mobile-frontend-nav-top' => 'ផ្នែកខាងលើ',
33743388 'mobile-frontend-nav-edit' => 'កែប្រែ',
33753389 'mobile-frontend-nav-history' => 'ប្រវត្តិ',
33763390 'mobile-frontend-search-text' => 'ស្វែងរក',
33773391 'mobile-frontend-contact-us' => 'ប្រសិនបើអ្នកមានសំណួរឬមតិយោបល់ សូមផ្ញើអ៊ីមែលមកកាន់យើងខ្ញុំតាមរយៈ mobile@wikipedia.org',
3378 - 'mobile-frontend-author-link' => 'បើកមើលឯកសារមេឌានេះនៅលើ{{SITENAME}}ធម្មតា ដើម្បីមើលព័ត៌មានអំពីម្ចាស់កម្មសិទ្ធ អាជ្ញាប័ណ្ឌ និងការបរិយាយបន្ថែមទៀត។',
 3392+ 'mobile-frontend-author-link' => 'បើកមើលឯកសារមេឌានេះនៅលើ{{SITENAME}}ធម្មតា ដើម្បីមើលព័ត៌មានអំពីម្ចាស់កម្មសិទ្ធ អាជ្ញាប័ណ្ឌ និងការពណ៌នាបន្ថែមទៀត។',
33793393 'mobile-frontend-download-full-version' => 'ទាញយកវើសិនពេញ',
33803394 'mobile-frontend-file-namespace' => 'ឯកសារ',
33813395 'mobile-frontend-wml-continue' => 'បន្ត...',
@@ -3384,7 +3398,7 @@
33853399 'mobile-frontend-opt-in-yes-button' => 'បាទ/ចាស៎',
33863400 'mobile-frontend-opt-in-no-button' => 'ទេ',
33873401 'mobile-frontend-opt-in-title' => 'ការចូលរួម​សាកល្បង​ប្រើ​កម្មវិធី​បេតា​សំរាប់​ឧបករណ៍​ចល័ត',
3388 - 'mobile-frontend-opt-in-explain' => 'ដោយ​ចូលរួម​កម្មវិធី​បេតេ អ្នក​នឹងមាន​លទ្ធភាព​ប្រើ​មុខងា​ដែល​កំពុង​ស្ថិតនៅក្រោម​ការពិសោធន៍​នៅឡើយ ដែល​ធ្វើ​អោយ​អ្នកប្រឈមមុខ​នឹង​បញ្ហា​តូចតាច​មួយចំនួន។',
 3402+ 'mobile-frontend-opt-in-explain' => 'ដោយ​ចូលរួម​កម្មវិធី​បេតា អ្នក​នឹងមាន​លទ្ធភាព​ប្រើ​មុខងា​រដែល​កំពុង​ស្ថិតនៅក្រោម​ការពិសោធន៍​នៅឡើយ ដែល​អាចធ្វើ​អោយ​អ្នកប្រឈមមុខ​នឹង​បញ្ហា​តូចតាច​មួយចំនួន។',
33893403 'mobile-frontend-opt-out-message' => 'ចាកចេញពីកម្មវិធីបេតាសំរាប់ឧបករណ៍ចល័តឬ?',
33903404 'mobile-frontend-opt-out-yes-button' => 'បាទ/ចាស៎',
33913405 'mobile-frontend-opt-out-no-button' => 'ទេ',
@@ -3392,7 +3406,7 @@
33933407 'mobile-frontend-opt-out-explain' => 'ដោយ​ចាកចេញ​ពី​កម្មវិធី​បេតា អ្នកនឹង​បិទ​មិនប្រើ​កម្មវិធី​ដែលស្ថិត​នៅក្រោម​ការពិសោធន៍​ទាំងអស់ រួចត្រលប់​ទៅប្រើ​កម្មវិធី​សំរាប់​ឧបករណ៍​ចល័ត​ធម្មតា​វិញ។',
33943408 'mobile-frontend-disable-images' => 'បិទមិនអោយមើលរូបភាពនៅលើវិបសាយសំរាប់ឧបករណ៍ចល័ត',
33953409 'mobile-frontend-enable-images' => 'បើកអោយមើលរូបភាពនៅលើវិបសាយសំរាប់ឧបករណ៍ចល័ត',
3396 - 'mobile-frontend-news-items' => 'នៅក្នុងសារពត៌មាន',
 3410+ 'mobile-frontend-news-items' => 'នៅក្នុងសារព័ត៌មាន',
33973411 'mobile-frontend-leave-feedback-title' => 'សូមផ្ដល់មតិយោបល់អំពីវិបសាយសំរាប់ឧបករណ៍ចល័តរបស់យើងខ្ញុំ',
33983412 'mobile-frontend-leave-feedback-notice' => 'មតិយោបល់របស់អ្នកនឹងជួយយើងខ្ញុំក្នុងការកែលំអវិបសាយសំរាប់ឧបករណ៍ចល័តរបស់យើងអោយកាន់តែប្រសើរឡើង។ មតិរបស់អ្នក (ព្រមជាមួយនឹងអត្តនាម វើសិនរបស់ឧបករណ៍រាវរក និងប្រព័ន្ធប្រតិបត្តិ) នឹងត្រូវបានផ្សព្វផ្សាយជាសាធារណៈនៅលើទំព័រ &quot;$1&quot;។ សូមជ្រើសរើសពាក្យដែលមានព័ត៌មានគ្រប់គ្រាន់​សំរាប់ដាក់ជាចំណងជើង។ ឧទាហរណ៍ "បញ្ហាទំរង់របស់តារាងធំៗ"។ មតិយោបល់របស់អ្នកនឹងត្រូវបានប្រើទៅតាមលក្ខខណ្ឌនៃការប្រើប្រាស់របស់យើងខ្ញុំ។',
33993413 'mobile-frontend-leave-feedback-subject' => 'ប្រធានបទ​',
@@ -3408,6 +3422,7 @@
34093423 'mobile-frontend-login' => 'កត់ឈ្មោះចូល',
34103424 'mobile-frontend-placeholder' => 'វាយបញ្ជួលពាក្យដែលអ្នកចង់ស្វែងរកនៅទីនេះ...',
34113425 'mobile-frontend-dismiss-notification' => 'បិទការផ្ដល់ដំណឹងនេះ',
 3426+ 'mobile-frontend-clear-search' => 'ជំរះ',
34123427 );
34133428
34143429 /** Kannada (ಕನ್ನಡ)
@@ -4114,7 +4129,7 @@
41154130 * @author Bjankuloski06
41164131 */
41174132 $messages['mk'] = array(
4118 - 'mobile-frontend-desc' => 'Кориснички дел за мобилен уред',
 4133+ 'mobile-frontend-desc' => 'Мобилен посредник',
41194134 'mobile-frontend-search-submit' => 'Оди',
41204135 'mobile-frontend-search-results' => 'Резултати од пребарувањето',
41214136 'mobile-frontend-no-article-found' => 'Нема пронајдено статија',
@@ -4127,18 +4142,18 @@
41284143 'mobile-frontend-hide-button' => 'Скриј',
41294144 'mobile-frontend-disable-button' => 'Оневозможи',
41304145 'mobile-frontend-back-button' => 'Назад',
4131 - 'mobile-frontend-regular-site' => 'режим „работна површина“',
 4146+ 'mobile-frontend-regular-site' => 'Обичен изглед',
41324147 'mobile-frontend-error-page-title' => 'Имаме проблем!',
41334148 'mobile-frontend-error-page-text' => 'Мобилното издание на {{SITENAME}} е сè уште во активен развој, и работиме напорно за да ги поправиме сите внатрешни грешки. Известени сме за оваа грешка и набргу ќе ја поправиме. Проверете повторно!',
41344149 'mobile-frontend-are-you-sure' => 'Дали сте сигурни ?',
4135 - 'mobile-frontend-explain-disable' => 'Дали сте сигурни дека сакате да ја оневозможите мобилната верзија на {{SITENAME}}? Ако одберете <b>Оневозможи</b>, тоа ќе значи дека оттогаш па натаму кога ќе ја посетите {{SITENAME}}, страницата нема да ве пренасочува на овој мобилен режим на {{SITENAME}}.',
 4150+ 'mobile-frontend-explain-disable' => 'Дали сте сигурни дека сакате да ја оневозможите мобилната верзија на {{SITENAME}}? Ако одберете <b>Оневозможи</b>, тоа ќе значи дека оттогаш па натаму кога ќе ја посетите {{SITENAME}}, страницата нема да ве пренасочува на овој мобилен изглед на {{SITENAME}}.',
41364151 'mobile-frontend-nav-end' => 'Најдолу',
41374152 'mobile-frontend-nav-top' => 'Најгоре',
41384153 'mobile-frontend-nav-edit' => 'Уреди',
41394154 'mobile-frontend-nav-history' => 'Историја',
41404155 'mobile-frontend-search-text' => 'Пребарај',
41414156 'mobile-frontend-contact-us' => 'Ако имате било какви прашања или примедби, слободно пишете ни на mobile@wikipedia.org',
4142 - 'mobile-frontend-author-link' => 'Погледајте ја снимкава на обичен режим на {{SITENAME}} за да видите повеќе информации за авторот, лиценцата и дополнителен опис.',
 4157+ 'mobile-frontend-author-link' => 'Погледајте ја снимкава на обичен изглед на {{SITENAME}} за да видите повеќе информации за авторот, лиценцата и дополнителен опис.',
41434158 'mobile-frontend-download-full-version' => 'Преземи полна верзија',
41444159 'mobile-frontend-file-namespace' => 'Податотека',
41454160 'mobile-frontend-wml-continue' => 'Продолжи ...',
@@ -4154,8 +4169,8 @@
41554170 'mobile-frontend-opt-out-no-button' => 'не',
41564171 'mobile-frontend-opt-out-title' => 'Напуштање на бета-верзијата за мобилни уреди',
41574172 'mobile-frontend-opt-out-explain' => 'Напуштајќи ја бета-верзијата за мобилни уреди ги оневозможувате сите експериментални функции и се враќате на класичната мобилна верзија.',
4158 - 'mobile-frontend-disable-images' => 'Оневозможи слики на мобилното мреж. место',
4159 - 'mobile-frontend-enable-images' => 'Овозможи слики на мобилното мреж. место',
 4173+ 'mobile-frontend-disable-images' => 'Оневозможи слики во мобилниот изглед',
 4174+ 'mobile-frontend-enable-images' => 'Овозможи слики во мобилниот изглед',
41604175 'mobile-frontend-news-items' => 'Вести',
41614176 'mobile-frontend-leave-feedback-title' => 'Дајте ни ваше мислење за мобилната верзија',
41624177 'mobile-frontend-leave-feedback-notice' => 'Вашето мислење ни помага да ја подобриме мобилната верзија. Мислењето ќе биде објавено јавно (заедно со корисничкото име, верзијата на прелистувачот и оперативниот систем) на страницата „$1“. Одберете информативен наслов, како на пр. „Проблем со форматирање на широките табели“. Искажаното мислење подлежи на условите на употреба.',
@@ -4888,7 +4903,7 @@
48894904 'mobile-frontend-hide-button' => 'Айсын',
48904905 'mobile-frontend-disable-button' => 'Ахицæн кæнын',
48914906 'mobile-frontend-back-button' => 'Фæстæмæ',
4892 - 'mobile-frontend-regular-site' => 'Кæсын ацы фарс нæуи {{grammar:genitive|{{SITENAME}}}}',
 4907+ 'mobile-frontend-regular-site' => 'Æнæхъæнæй',
48934908 'mobile-frontend-error-page-title' => 'Проблемæ нæм ис!',
48944909 'mobile-frontend-error-page-text' => 'Мобилон {{SITENAME}} нырмадæр кæронмæ арызт нæу, æмæ мах кусæм нæ мидæггаг рæдыддытæ раст кæныныл. Мах фехъусын кодтой ацы рæдыды тыххæй æмæ йæ тагъд хъуамæ сраст кæнæм. Дæ хорзæхæй, фæстæдæр та бафæлвар!',
48954910 'mobile-frontend-are-you-sure' => 'Æцæг дæ фæнды?',
@@ -4913,6 +4928,13 @@
49144929 'mobile-frontend-enable-images' => 'Баиу кæнын нывтæ мобилон сайты',
49154930 'mobile-frontend-news-items' => 'Нæуæг хабæртты',
49164931 'mobile-frontend-leave-feedback-message' => 'Фыстæг',
 4932+ 'mobile-frontend-leave-feedback-cancel' => 'Ныууадзын',
 4933+ 'mobile-frontend-language' => 'Æвзаг',
 4934+ 'mobile-frontend-username' => 'Архайæджы ном:',
 4935+ 'mobile-frontend-password' => 'Пароль:',
 4936+ 'mobile-frontend-login' => 'Бахизын',
 4937+ 'mobile-frontend-clear-search' => 'Схафын',
 4938+ 'mobile-frontend-about-link-text' => 'Афыст',
49174939 );
49184940
49194941 /** Punjabi (ਪੰਜਾਬੀ) */
@@ -5533,6 +5555,7 @@
55345556 );
55355557
55365558 /** Russian (Русский)
 5559+ * @author Bouron
55375560 * @author Dim Grits
55385561 * @author Express2000
55395562 * @author Kaganer
@@ -5553,7 +5576,7 @@
55545577 'mobile-frontend-hide-button' => 'Скрыть',
55555578 'mobile-frontend-disable-button' => 'Отключить',
55565579 'mobile-frontend-back-button' => 'Назад',
5557 - 'mobile-frontend-regular-site' => 'Просмотреть страницу в обычной {{grammar:genitive|{{SITENAME}}}}',
 5580+ 'mobile-frontend-regular-site' => 'Обычная версия',
55585581 'mobile-frontend-error-page-title' => 'У нас проблема!',
55595582 'mobile-frontend-error-page-text' => 'Мобильная версия {{grammar:genitive|{{SITENAME}}}} ещё находится в стадии активной разработки, и мы прилагаем максимум усилий, чтобы исправить все наши внутренние ошибки. Мы были уведомлены об этой ошибке и планируем её вскоре исправить. Пожалуйста, проверьте через некоторое время!',
55605583 'mobile-frontend-are-you-sure' => 'Вы уверены?',

Follow-up revisions

RevisionCommit summaryAuthorDate
r114498Followup r114497, removing WURFLawjrichards21:45, 26 March 2012
r114504Followup r114497; Adding files that got missed in previous sync to git origin...awjrichards23:03, 26 March 2012

Status & tagging log