Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3967,9 +3967,9 @@ |
3968 | 3968 | if ( $isTemplate ) { |
3969 | 3969 | # Put a T flag in the section identifier, to indicate to extractSections() |
3970 | 3970 | # that sections inside <includeonly> should be counted. |
3971 | | - $editlink = $sk->doEditSectionLink( Title::newFromText( $titleText ), "T-$sectionIndex" ); |
| 3971 | + $editlink = $sk->doEditSectionLink( Title::newFromText( $titleText ), "T-$sectionIndex", null, $this->mOptions->getUserLang() ); |
3972 | 3972 | } else { |
3973 | | - $editlink = $sk->doEditSectionLink( $this->mTitle, $sectionIndex, $headlineHint ); |
| 3973 | + $editlink = $sk->doEditSectionLink( $this->mTitle, $sectionIndex, $headlineHint, $this->mOptions->getUserLang() ); |
3974 | 3974 | } |
3975 | 3975 | } else { |
3976 | 3976 | $editlink = ''; |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1375,16 +1375,17 @@ |
1376 | 1376 | * to be included in the link, like "§ion=$section" |
1377 | 1377 | * @param $tooltip string The tooltip to use for the link: will be escaped |
1378 | 1378 | * and wrapped in the 'editsectionhint' message |
| 1379 | + * @param $lang string Language code |
1379 | 1380 | * @return string HTML to use for edit link |
1380 | 1381 | */ |
1381 | | - public function doEditSectionLink( Title $nt, $section, $tooltip = null ) { |
| 1382 | + public function doEditSectionLink( Title $nt, $section, $tooltip = null, $lang = false ) { |
1382 | 1383 | // HTML generated here should probably have userlangattributes |
1383 | 1384 | // added to it for LTR text on RTL pages |
1384 | 1385 | $attribs = array(); |
1385 | 1386 | if( !is_null( $tooltip ) ) { |
1386 | | - $attribs['title'] = wfMsg( 'editsectionhint', $tooltip ); |
| 1387 | + $attribs['title'] = wfMsgReal( 'editsectionhint', array( $tooltip ), true, $lang ); |
1387 | 1388 | } |
1388 | | - $link = $this->link( $nt, wfMsg('editsection'), |
| 1389 | + $link = $this->link( $nt, wfMsgExt( 'editsection', array( 'language'=> $lang ) ), |
1389 | 1390 | $attribs, |
1390 | 1391 | array( 'action' => 'edit', 'section' => $section ), |
1391 | 1392 | array( 'noclasses', 'known' ) |
— | — | @@ -1394,7 +1395,7 @@ |
1395 | 1396 | # we can rid of it someday. |
1396 | 1397 | $attribs = ''; |
1397 | 1398 | if( $tooltip ) { |
1398 | | - $attribs = wfMsgHtml( 'editsectionhint', htmlspecialchars( $tooltip ) ); |
| 1399 | + $attribs = htmlspecialchars( wfMsgReal( 'editsectionhint', array( $tooltip ), true, $lang ) ); |
1399 | 1400 | $attribs = " title=\"$attribs\""; |
1400 | 1401 | } |
1401 | 1402 | $result = null; |
— | — | @@ -1404,13 +1405,13 @@ |
1405 | 1406 | # run, and even add them to hook-provided text. (This is the main |
1406 | 1407 | # reason that the EditSectionLink hook is deprecated in favor of |
1407 | 1408 | # DoEditSectionLink: it can't change the brackets or the span.) |
1408 | | - $result = wfMsgHtml( 'editsection-brackets', $result ); |
| 1409 | + $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language'=>$lang ), $link ); |
1409 | 1410 | return "<span class=\"editsection\">$result</span>"; |
1410 | 1411 | } |
1411 | 1412 | |
1412 | 1413 | # Add the brackets and the span, and *then* run the nice new hook, with |
1413 | 1414 | # clean and non-redundant arguments. |
1414 | | - $result = wfMsgHtml( 'editsection-brackets', $link ); |
| 1415 | + $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language'=>$lang ), $link ); |
1415 | 1416 | $result = "<span class=\"editsection\">$result</span>"; |
1416 | 1417 | |
1417 | 1418 | wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result ) ); |