| Index: trunk/extensions/LiquidThreads/LiquidThreads.php |
| — | — | @@ -42,6 +42,58 @@ |
| 43 | 43 | $wgExtensionMessagesFiles['LiquidThreadsNamespaces'] = $dir . 'i18n/Lqt.namespaces.php'; |
| 44 | 44 | $wgExtensionAliasesFiles['LiquidThreads'] = $dir . 'i18n/Lqt.alias.php'; |
| 45 | 45 | |
| | 46 | +$lqtMessages = array( |
| | 47 | + 'lqt-quote-intro', |
| | 48 | + 'lqt-quote', |
| | 49 | + 'lqt-ajax-updated', |
| | 50 | + 'lqt-ajax-update-link', |
| | 51 | + 'watch', |
| | 52 | + 'unwatch', |
| | 53 | + 'lqt-thread-link-url', |
| | 54 | + 'lqt-thread-link-title', |
| | 55 | + 'lqt-thread-link-copy', |
| | 56 | + 'lqt-sign-not-necessary', |
| | 57 | + 'lqt-marked-as-read-placeholder', |
| | 58 | + 'lqt-email-undo', |
| | 59 | + 'lqt-change-subject', |
| | 60 | + 'lqt-save-subject', |
| | 61 | + 'lqt-ajax-no-subject', |
| | 62 | + 'lqt-ajax-invalid-subject', |
| | 63 | + 'lqt-save-subject-error-unknown', |
| | 64 | + 'lqt-cancel-subject-edit', |
| | 65 | + 'lqt-drag-activate', |
| | 66 | + 'lqt-drag-drop-zone', |
| | 67 | + 'lqt-drag-confirm', |
| | 68 | + 'lqt-drag-reparent', |
| | 69 | + 'lqt-drag-split', |
| | 70 | + 'lqt-drag-setsortkey', |
| | 71 | + 'lqt-drag-bump', |
| | 72 | + 'lqt-drag-save', |
| | 73 | + 'lqt-drag-reason', |
| | 74 | + 'lqt-drag-subject', |
| | 75 | + 'lqt-edit-signature', |
| | 76 | + 'lqt-preview-signature', |
| | 77 | + 'lqt_contents_title' |
| | 78 | +); |
| | 79 | + |
| | 80 | +// ResourceLoader |
| | 81 | +$lqtResourceTemplate = array( |
| | 82 | + 'localBasePath' => "$dir", |
| | 83 | + 'remoteExtPath' => 'LiquidThreads' |
| | 84 | +); |
| | 85 | + |
| | 86 | +$wgResourceModules['ext.liquidThreads'] = $lqtResourceTemplate + array( |
| | 87 | + 'styles' => array( 'lqt.css', 'jquery/jquery.thread_collapse.css' ), |
| | 88 | + 'scripts' => array( 'lqt.js', 'js/lqt.toolbar.js', 'jquery/jquery.thread_collapse.js', 'jquery/jquery.autogrow.js' ), |
| | 89 | + 'dependencies' => array( 'jquery.ui.dialog' ), |
| | 90 | + 'messages' => $lqtMessages |
| | 91 | +); |
| | 92 | + |
| | 93 | +$wgResourceModules['ext.liquidThreads.newMessages'] = $lqtResourceTemplate + array( |
| | 94 | + 'scripts' => array( 'newmessages.js' ), |
| | 95 | + 'dependancies' => array( 'ext.liquidThreads' ) |
| | 96 | +); |
| | 97 | + |
| 46 | 98 | // Parser Function Setup |
| 47 | 99 | $wgHooks['ParserFirstCallInit'][] = 'lqtSetupParserFunctions'; |
| 48 | 100 | |
| Index: trunk/extensions/LiquidThreads/newmessages.js |
| — | — | @@ -7,8 +7,8 @@ |
| 8 | 8 | var right_col = row.find('td.lqt-newmessages-right'); |
| 9 | 9 | $j(button).closest('td').empty(); |
| 10 | 10 | |
| 11 | | - var msg = wgLqtMessages['lqt-marked-as-read-placeholder']; |
| 12 | | - var undoMsg = wgLqtMessages['lqt-email-undo']; |
| | 11 | + var msg = mediaWiki.msg('lqt-marked-as-read-placeholder'); |
| | 12 | + var undoMsg = mediaWiki.msg('lqt-email-undo'); |
| 13 | 13 | // We have to split the message to the part before the |
| 14 | 14 | // $1 and the part after the $1 |
| 15 | 15 | var placeholderIndex = msg.indexOf( '$1' ); |
| Index: trunk/extensions/LiquidThreads/classes/View.php |
| — | — | @@ -1220,107 +1220,6 @@ |
| 1221 | 1221 | return $commands; |
| 1222 | 1222 | } |
| 1223 | 1223 | |
| 1224 | | - /************************* |
| 1225 | | - * Output methods * |
| 1226 | | - *************************/ |
| 1227 | | - |
| 1228 | | - static function addJSandCSS() { |
| 1229 | | - if ( self::$stylesAndScriptsDone ) { |
| 1230 | | - return; |
| 1231 | | - } |
| 1232 | | - |
| 1233 | | - global $wgOut; |
| 1234 | | - global $wgStyleVersion; |
| 1235 | | - |
| 1236 | | - LqtHooks::$scriptVariables['wgLqtMessages'] = self::exportJSLocalisation(); |
| 1237 | | - |
| 1238 | | - if ( method_exists( $wgOut, 'includeJQuery' ) ) { |
| 1239 | | - $wgOut->includeJQuery(); |
| 1240 | | - } |
| 1241 | | - |
| 1242 | | - $output = self::getJSAndCSS(); |
| 1243 | | - |
| 1244 | | - foreach( $output['scripts'] as $script ) { |
| 1245 | | - $wgOut->addScriptFile( "$script?$wgStyleVersion" ); |
| 1246 | | - } |
| 1247 | | - |
| 1248 | | - foreach( $output['styles'] as $style ) { |
| 1249 | | - $wgOut->addExtensionStyle( "$style?$wgStyleVersion" ); |
| 1250 | | - } |
| 1251 | | - |
| 1252 | | - self::$stylesAndScriptsDone = true; |
| 1253 | | - } |
| 1254 | | - |
| 1255 | | - static function getJSAndCSS() { |
| 1256 | | - global $wgLiquidThreadsExtensionPath, $wgOut; |
| 1257 | | - // Returns an associative array, with the keys: styles, scripts |
| 1258 | | - |
| 1259 | | - $styles = array( |
| 1260 | | - "$wgLiquidThreadsExtensionPath/jquery/jquery-ui-1.7.2.css", |
| 1261 | | - "$wgLiquidThreadsExtensionPath/jquery/jquery.thread_collapse.css", |
| 1262 | | - "$wgLiquidThreadsExtensionPath/lqt.css", |
| 1263 | | - ); |
| 1264 | | - |
| 1265 | | - $scripts = array( |
| 1266 | | - "$wgLiquidThreadsExtensionPath/lqt.js", |
| 1267 | | - "$wgLiquidThreadsExtensionPath/js/lqt.toolbar.js", |
| 1268 | | - "$wgLiquidThreadsExtensionPath/jquery/jquery.thread_collapse.js", |
| 1269 | | - "$wgLiquidThreadsExtensionPath/jquery/jquery.autogrow.js" |
| 1270 | | - ); |
| 1271 | | - |
| 1272 | | - if ( method_exists( $wgOut, 'includeJQuery' ) ) { |
| 1273 | | - $scripts[] = "$wgLiquidThreadsExtensionPath/jquery/plugins.js"; |
| 1274 | | - } else { |
| 1275 | | - $scripts[] = "$wgLiquidThreadsExtensionPath/jquery/js2.combined.js"; |
| 1276 | | - } |
| 1277 | | - |
| 1278 | | - return array( 'scripts' => $scripts, 'styles' => $styles ); |
| 1279 | | - } |
| 1280 | | - |
| 1281 | | - static function exportJSLocalisation() { |
| 1282 | | - $messages = array( |
| 1283 | | - 'lqt-quote-intro', |
| 1284 | | - 'lqt-quote', |
| 1285 | | - 'lqt-ajax-updated', |
| 1286 | | - 'lqt-ajax-update-link', |
| 1287 | | - 'watch', |
| 1288 | | - 'unwatch', |
| 1289 | | - 'lqt-thread-link-url', |
| 1290 | | - 'lqt-thread-link-title', |
| 1291 | | - 'lqt-thread-link-copy', |
| 1292 | | - 'lqt-sign-not-necessary', |
| 1293 | | - 'lqt-marked-as-read-placeholder', |
| 1294 | | - 'lqt-email-undo', |
| 1295 | | - 'lqt-change-subject', |
| 1296 | | - 'lqt-save-subject', |
| 1297 | | - 'lqt-ajax-no-subject', |
| 1298 | | - 'lqt-ajax-invalid-subject', |
| 1299 | | - 'lqt-save-subject-error-unknown', |
| 1300 | | - 'lqt-cancel-subject-edit', |
| 1301 | | - 'lqt-drag-activate', |
| 1302 | | - 'lqt-drag-drop-zone', |
| 1303 | | - 'lqt-drag-confirm', |
| 1304 | | - 'lqt-drag-reparent', |
| 1305 | | - 'lqt-drag-split', |
| 1306 | | - 'lqt-drag-setsortkey', |
| 1307 | | - 'lqt-drag-bump', |
| 1308 | | - 'lqt-drag-save', |
| 1309 | | - 'lqt-drag-reason', |
| 1310 | | - 'lqt-drag-subject', |
| 1311 | | - 'lqt-edit-signature', |
| 1312 | | - 'lqt-preview-signature', |
| 1313 | | - 'lqt_contents_title', |
| 1314 | | - ); |
| 1315 | | - |
| 1316 | | - $data = array(); |
| 1317 | | - |
| 1318 | | - foreach ( $messages as $msg ) { |
| 1319 | | - $data[$msg] = wfMsgNoTrans( $msg ); |
| 1320 | | - } |
| 1321 | | - |
| 1322 | | - return $data; |
| 1323 | | - } |
| 1324 | | - |
| 1325 | 1224 | /* @return False if the article and revision do not exist. The HTML of the page to |
| 1326 | 1225 | * display if it exists. Note that this impacts the state out OutputPage by adding |
| 1327 | 1226 | * all the other relevant parts of the parser output. If you don't want this, call |
| — | — | @@ -1872,6 +1771,7 @@ |
| 1873 | 1772 | |
| 1874 | 1773 | function showThread( $thread, $levelNum = 1, $totalInLevel = 1, |
| 1875 | 1774 | $options = array() ) { |
| | 1775 | + global $wgOut; |
| 1876 | 1776 | |
| 1877 | 1777 | // Safeguard |
| 1878 | 1778 | if ( $thread->type() & Threads::TYPE_DELETED || |
| — | — | @@ -1941,7 +1841,7 @@ |
| 1942 | 1842 | ) ); |
| 1943 | 1843 | $replyTo = $this->methodAppliesToThread( 'reply', $thread ); |
| 1944 | 1844 | |
| 1945 | | - self::addJSandCSS(); |
| | 1845 | + $this->output->addModules( 'ext.liquidThreads' ); |
| 1946 | 1846 | |
| 1947 | 1847 | $html = ''; |
| 1948 | 1848 | wfRunHooks( 'EditPageBeforeEditToolbar', array( &$html ) ); |
| Index: trunk/extensions/LiquidThreads/classes/Hooks.php |
| — | — | @@ -29,10 +29,9 @@ |
| 30 | 30 | return true; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | | - LqtView::addJSandCSS(); |
| 34 | | - |
| 35 | | - global $wgUser, $wgLang; |
| | 33 | + global $wgUser, $wgLang, $wgOut; |
| 36 | 34 | $sk = $wgUser->getSkin(); |
| | 35 | + $wgOut->addModules( 'ext.liquidThreads' ); |
| 37 | 36 | |
| 38 | 37 | // Custom display for new posts. |
| 39 | 38 | if ( $rc->mAttribs['rc_new'] ) { |
| — | — | @@ -108,7 +107,7 @@ |
| 109 | 108 | if ( $tn == 0 && $wn == 0 ) |
| 110 | 109 | return true; |
| 111 | 110 | |
| 112 | | - LqtView::addJSandCSS(); |
| | 111 | + $wgOut->addModules( 'ext.liquidThreads' ); |
| 113 | 112 | $messages_title = SpecialPage::getTitleFor( 'NewMessages' ); |
| 114 | 113 | $new_messages = wfMsgExt( 'lqt-new-messages', 'parseinline' ); |
| 115 | 114 | |
| Index: trunk/extensions/LiquidThreads/pages/ThreadHistoricalRevisionView.php |
| — | — | @@ -120,7 +120,7 @@ |
| 121 | 121 | |
| 122 | 122 | $this->showHistoryInfo(); |
| 123 | 123 | |
| 124 | | - self::addJSandCSS(); |
| | 124 | + $this->output->addModules( 'ext.liquidThreads' ); |
| 125 | 125 | $this->output->setSubtitle( $this->getSubtitle() ); |
| 126 | 126 | |
| 127 | 127 | $changedObject = $this->mDisplayRevision->getChangeObject(); |
| Index: trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php |
| — | — | @@ -189,12 +189,7 @@ |
| 190 | 190 | $mustShowThreads = $this->highlightThreads; |
| 191 | 191 | |
| 192 | 192 | $this->showThread( $t, 1, 1, array( 'mustShowThreads' => $mustShowThreads ) ); |
| 193 | | - static $scriptDone = false; |
| 194 | | - if ( !$scriptDone ) { |
| 195 | | - global $wgLiquidThreadsExtensionPath; |
| 196 | | - $this->output->addScriptFile( "$wgLiquidThreadsExtensionPath/newmessages.js" ); |
| 197 | | - $scriptDone = true; |
| 198 | | - } |
| | 193 | + $this->output->addModules( 'ext.liquidThreads.newMessages' ); |
| 199 | 194 | $this->output->addHTML( "</td></tr>" ); |
| 200 | 195 | } |
| 201 | 196 | } |
| Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php |
| — | — | @@ -225,7 +225,7 @@ |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | function show() { |
| 229 | | - LqtView::addJSandCSS(); |
| | 229 | + $this->output->addModules( 'ext.liquidThreads' ); |
| 230 | 230 | |
| 231 | 231 | $this->output->setPageTitle( $this->title->getPrefixedText() ); |
| 232 | 232 | |
| Index: trunk/extensions/LiquidThreads/lqt.js |
| — | — | @@ -160,7 +160,7 @@ |
| 161 | 161 | $j(container).find('input[name=wpLqtSignature]').hide(); |
| 162 | 162 | $j(container).find('.lqt-signature-preview').show(); |
| 163 | 163 | var editLink = $j('<a class="lqt-signature-edit-button"/>' ); |
| 164 | | - editLink.text( wgLqtMessages['lqt-edit-signature'] ); |
| | 164 | + editLink.text( mediaWiki.msg('lqt-edit-signature') ); |
| 165 | 165 | editLink.click( liquidThreads.handleEditSignature ); |
| 166 | 166 | editLink.attr('href', '#'); |
| 167 | 167 | $j(container).find('.lqt-signature-preview').after(editLink); |
| — | — | @@ -248,22 +248,7 @@ |
| 249 | 249 | function(result) { |
| 250 | 250 | var content = $j(result.threadaction.inlineeditform.html); |
| 251 | 251 | $j(container).empty().append(content); |
| 252 | | - |
| 253 | | - // Add resources if necessary |
| 254 | | - if ( typeof wgLqtMessages == 'undefined' || !wgLqtMessages ) { |
| 255 | | - wgLqtMessages = result.threadaction.resources.messages; |
| 256 | | - |
| 257 | | - $j.each( result.threadaction.resources.scripts, |
| 258 | | - function(index,value) { |
| 259 | | - $j.getScript( value ); |
| 260 | | - } ); |
| 261 | | - |
| 262 | | - $j.each( result.threadaction.resources.styles, |
| 263 | | - function(index,value) { |
| 264 | | - $j.getCSS( value ); |
| 265 | | - } ); |
| 266 | | - } |
| 267 | | - |
| | 252 | + |
| 268 | 253 | callback(); |
| 269 | 254 | } ); |
| 270 | 255 | }, |
| — | — | @@ -351,7 +336,7 @@ |
| 352 | 337 | |
| 353 | 338 | // Add "Drag to new location" to menu |
| 354 | 339 | var dragLI = $j('<li class="lqt-command-drag lqt-command" />' ); |
| 355 | | - var dragLink = $j('<a/>').text( wgLqtMessages['lqt-drag-activate'] ); |
| | 340 | + var dragLink = $j('<a/>').text( mediaWiki.msg('lqt-drag-activate') ); |
| 356 | 341 | dragLink.attr('href','#'); |
| 357 | 342 | dragLI.append(dragLink); |
| 358 | 343 | dragLink.click( liquidThreads.activateDragDrop ); |
| — | — | @@ -398,7 +383,7 @@ |
| 399 | 384 | |
| 400 | 385 | var editSubjectField = $j('<li/>'); |
| 401 | 386 | var editSubjectLink = $j('<a href="#"/>'); |
| 402 | | - editSubjectLink.text( wgLqtMessages['lqt-change-subject'] ); |
| | 387 | + editSubjectLink.text( mediaWiki.msg('lqt-change-subject') ); |
| 403 | 388 | editSubjectField.append( editSubjectLink ); |
| 404 | 389 | editSubjectField.click( liquidThreads.handleChangeSubject ); |
| 405 | 390 | editSubjectField.data( 'thread-id', id ) |
| — | — | @@ -423,13 +408,13 @@ |
| 424 | 409 | textbox.attr('size', '75'); |
| 425 | 410 | textbox.val(headerText); |
| 426 | 411 | |
| 427 | | - var saveText = wgLqtMessages['lqt-save-subject']; |
| | 412 | + var saveText = mediaWiki.msg('lqt-save-subject'); |
| 428 | 413 | var saveButton = $j('<input type="button" />'); |
| 429 | 414 | saveButton.val( saveText ); |
| 430 | 415 | saveButton.click( liquidThreads.handleSubjectSave ); |
| 431 | 416 | |
| 432 | 417 | var cancelButton = $j('<input type="button" />'); |
| 433 | | - cancelButton.val( wgLqtMessages['lqt-cancel-subject-edit'] ); |
| | 418 | + cancelButton.val( mediaWiki.msg('lqt-cancel-subject-edit') ); |
| 434 | 419 | cancelButton.click( function(e) { |
| 435 | 420 | var form = $j(this).closest('.mw-subject-editor'); |
| 436 | 421 | var header = form.closest('.lqt_header'); |
| — | — | @@ -462,7 +447,7 @@ |
| 463 | 448 | var newSubject = textbox.val().trim(); |
| 464 | 449 | |
| 465 | 450 | if (!newSubject) { |
| 466 | | - alert( wgLqtMessages['lqt-ajax-no-subject'] ); |
| | 451 | + alert( mediaWiki.msg('lqt-ajax-no-subject') ); |
| 467 | 452 | return; |
| 468 | 453 | } |
| 469 | 454 | |
| — | — | @@ -484,16 +469,15 @@ |
| 485 | 470 | description = reply.error.info; |
| 486 | 471 | |
| 487 | 472 | if (code == 'invalid-subject') { |
| 488 | | - alert( wgLqtMessages['lqt-ajax-invalid-subject'] ); |
| | 473 | + alert( mediaWiki.msg('lqt-ajax-invalid-subject') ); |
| 489 | 474 | } else { |
| 490 | | - var msg = wgLqtMessages['lqt-save-subject-failed']; |
| 491 | | - msg.replace( '$1', description ); |
| | 475 | + var msg = mediaWiki.msg('lqt-save-subject-failed', $description ); |
| 492 | 476 | } |
| 493 | 477 | |
| 494 | 478 | subjectForm.show(); |
| 495 | 479 | spinner.remove(); |
| 496 | 480 | } catch (err) { |
| 497 | | - alert( wgLqtMessages['lqt-save-subject-error-unknown'] ); |
| | 481 | + alert( mediaWiki.msg('lqt-save-subject-error-unknown') ); |
| 498 | 482 | subjectForm.remove(); |
| 499 | 483 | spinner.remove(); |
| 500 | 484 | header.contents().filter('.mw-headline').show(); |
| — | — | @@ -575,11 +559,11 @@ |
| 576 | 560 | } |
| 577 | 561 | |
| 578 | 562 | var notifier = $j('<div/>'); |
| 579 | | - notifier.text( wgLqtMessages['lqt-ajax-updated'] + ' ' ); |
| | 563 | + notifier.text( mediaWiki.msg('lqt-ajax-updated') + ' ' ); |
| 580 | 564 | notifier.addClass( 'lqt-updated-notification' ); |
| 581 | 565 | |
| 582 | 566 | var updateButton = $j('<a href="#"/>'); |
| 583 | | - updateButton.text( wgLqtMessages['lqt-ajax-update-link'] ); |
| | 567 | + updateButton.text( mediaWiki.msg('lqt-ajax-update-link') ); |
| 584 | 568 | updateButton.addClass( 'lqt-update-link' ); |
| 585 | 569 | updateButton.click( liquidThreads.updateThread ); |
| 586 | 570 | |
| — | — | @@ -862,12 +846,12 @@ |
| 863 | 847 | linkTitle = '[['+linkTitle+']]'; |
| 864 | 848 | |
| 865 | 849 | // Build dialog |
| 866 | | - var urlLabel = $j('<th/>').text(wgLqtMessages['lqt-thread-link-url']); |
| | 850 | + var urlLabel = $j('<th/>').text(mediaWiki.msg('lqt-thread-link-url')); |
| 867 | 851 | var urlField = $j('<td/>').addClass( 'lqt-thread-link-url' ); |
| 868 | 852 | urlField.text(linkURL); |
| 869 | 853 | var urlRow = $j('<tr/>').append(urlLabel).append(urlField ); |
| 870 | 854 | |
| 871 | | - var titleLabel = $j('<th/>').text(wgLqtMessages['lqt-thread-link-title']); |
| | 855 | + var titleLabel = $j('<th/>').text(mediaWiki.msg('lqt-thread-link-title')); |
| 872 | 856 | var titleField = $j('<td/>').addClass( 'lqt-thread-link-title' ); |
| 873 | 857 | titleField.text(linkTitle); |
| 874 | 858 | var titleRow = $j('<tr/>').append(titleLabel).append(titleField ); |
| — | — | @@ -1034,7 +1018,7 @@ |
| 1035 | 1019 | $j('.lqt-new-thread').after(toc); |
| 1036 | 1020 | |
| 1037 | 1021 | var contentsHeading = $j('<h2/>'); |
| 1038 | | - contentsHeading.text(wgLqtMessages['lqt_contents_title']); |
| | 1022 | + contentsHeading.text(mediaWiki.msg('lqt_contents_title')); |
| 1039 | 1023 | toc.before(contentsHeading); |
| 1040 | 1024 | } |
| 1041 | 1025 | |
| — | — | @@ -1138,7 +1122,7 @@ |
| 1139 | 1123 | } |
| 1140 | 1124 | |
| 1141 | 1125 | // Show the warning |
| 1142 | | - var msg = wgLqtMessages['lqt-sign-not-necessary']; |
| | 1126 | + var msg = mediaWiki.msg('lqt-sign-not-necessary'); |
| 1143 | 1127 | var elem = $j('<div id="lqt-sign-warning" class="error"/>'); |
| 1144 | 1128 | elem.text(msg); |
| 1145 | 1129 | |
| — | — | @@ -1220,7 +1204,7 @@ |
| 1221 | 1205 | // other thread, and as a subthread of every post. |
| 1222 | 1206 | var createDropZone = function( sortKey, parent ) { |
| 1223 | 1207 | return $j( '<div class="lqt-drop-zone" />' ) |
| 1224 | | - .text( wgLqtMessages['lqt-drag-drop-zone'] ) |
| | 1208 | + .text( mediaWiki.msg('lqt-drag-drop-zone') ) |
| 1225 | 1209 | .data( 'sortkey', sortKey ) |
| 1226 | 1210 | .data( 'parent', parent ); |
| 1227 | 1211 | }; |
| — | — | @@ -1308,7 +1292,7 @@ |
| 1309 | 1293 | var confirmDialog = $j( '<div class="lqt-drag-confirm" />' ); |
| 1310 | 1294 | |
| 1311 | 1295 | // Add an intro |
| 1312 | | - var intro = $j( '<p/>' ).text( wgLqtMessages['lqt-drag-confirm'] ); |
| | 1296 | + var intro = $j( '<p/>' ).text( mediaWiki.msg('lqt-drag-confirm') ); |
| 1313 | 1297 | confirmDialog.append( intro ); |
| 1314 | 1298 | |
| 1315 | 1299 | // Summarize changes to be made |
| — | — | @@ -1316,7 +1300,7 @@ |
| 1317 | 1301 | |
| 1318 | 1302 | var addAction = function(msg) { |
| 1319 | 1303 | var li = $j('<li/>'); |
| 1320 | | - li.text( wgLqtMessages[msg] ); |
| | 1304 | + li.text( mediaWiki.msg(msg) ); |
| 1321 | 1305 | actionSummary.append(li); |
| 1322 | 1306 | }; |
| 1323 | 1307 | |
| — | — | @@ -1340,7 +1324,7 @@ |
| 1341 | 1325 | |
| 1342 | 1326 | // Summary prompt |
| 1343 | 1327 | var summaryWrapper = $j('<p/>'); |
| 1344 | | - var summaryPrompt = $j('<label for="reason" />').text( wgLqtMessages['lqt-drag-reason'] ); |
| | 1328 | + var summaryPrompt = $j('<label for="reason" />').text( mediaWiki.msg('lqt-drag-reason') ); |
| 1345 | 1329 | var summaryField = $j('<input type="text" size="45"/>'); |
| 1346 | 1330 | summaryField.addClass( 'lqt-drag-confirm-reason' ) |
| 1347 | 1331 | .attr( 'name', 'reason' ) |
| — | — | @@ -1355,7 +1339,7 @@ |
| 1356 | 1340 | |
| 1357 | 1341 | // New subject prompt, if appropriate |
| 1358 | 1342 | if ( !wasTopLevel && topLevel ) { |
| 1359 | | - var subjectPrompt = $j('<p/>').text( wgLqtMessages['lqt-drag-subject'] ); |
| | 1343 | + var subjectPrompt = $j('<p/>').text( mediaWiki.msg('lqt-drag-subject') ); |
| 1360 | 1344 | var subjectField = $j('<input type="text" size="45"/>'); |
| 1361 | 1345 | subjectField.addClass( 'lqt-drag-confirm-subject' ) |
| 1362 | 1346 | .attr( 'name', 'subject' ); |
| — | — | @@ -1374,7 +1358,7 @@ |
| 1375 | 1359 | liquidThreads.reloadTOC(); |
| 1376 | 1360 | }; |
| 1377 | 1361 | |
| 1378 | | - var buttonLabel = wgLqtMessages['lqt-drag-save'] |
| | 1362 | + var buttonLabel = mediaWiki.msg('lqt-drag-save'); |
| 1379 | 1363 | var buttons = {}; |
| 1380 | 1364 | buttons[buttonLabel] = |
| 1381 | 1365 | function() { |
| — | — | @@ -1399,7 +1383,7 @@ |
| 1400 | 1384 | liquidThreads.submitDragDrop( thread, params, |
| 1401 | 1385 | successCallback ); |
| 1402 | 1386 | }; |
| 1403 | | - confirmDialog.dialog( { 'title': wgLqtMessages['lqt-drag-title'], |
| | 1387 | + confirmDialog.dialog( { 'title': mediaWiki.msg('lqt-drag-title'), |
| 1404 | 1388 | 'buttons' : buttons, 'modal' : true, 'width': 550 } ); |
| 1405 | 1389 | }, |
| 1406 | 1390 | |
| — | — | @@ -1558,7 +1542,7 @@ |
| 1559 | 1543 | |
| 1560 | 1544 | // Add a save button |
| 1561 | 1545 | var saveButton = $j('<a href="#"/>'); |
| 1562 | | - saveButton.text( wgLqtMessages['lqt-preview-signature'] ); |
| | 1546 | + saveButton.text( mediaWiki.msg('lqt-preview-signature') ); |
| 1563 | 1547 | saveButton.click( liquidThreads.handlePreviewSignature ); |
| 1564 | 1548 | |
| 1565 | 1549 | container.find('input[name=wpLqtSignature]').after(saveButton); |