$wgTitle, if the section is included from a template)
$section: The designation of the section being pointed to, to be included in
the link, like "§ion=$section"
-$tooltip: The default tooltip. Escape with htmlspecialchars() before using.
+$tooltip: The default tooltip. Escape before using.
By default, this is wrapped in the 'editsectionhint' message.
&$result: The HTML to return, prefilled with the default plus whatever other
changes earlier hooks have made
-$lang: The language code to use for the link in the wfMsg* functions
+$lang: The language code to use for the link in the wfMessage function
'EditFilter': Perform checks on an edit
$editor: Edit form (see includes/EditPage.php)
$section: Section to link to
$link: Default link
&$result: Result (alter this to override the generated links)
-$lang: The language code to use for the link in the wfMsg* functions
+$lang: The language code to use for the link in the wfMessage function
'EmailConfirmed': When checking that the user's email address is "confirmed"
$user: User being checked
- lim Integer Limit of items to show, default is 50
- conds Array Extra conditions for the query (e.g. "log_action != 'revision'")
- showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty if set to true (default), "No matching items in log" is displayed if loglist is empty
- - msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wfMsgExt and option 'parse'
+ - msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wfMessage()->params()->parseAsBlock()
- offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset
- wrap String Wrap the message in html (usually something like "<div ...>$1</div>").
- flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
'PreferencesGetLegend': Override the text used for the <legend> of a preferences section
$form: the PreferencesForm object. This is a ContextSource as well
$key: the section name
-&$legend: the legend text. Defaults to wfMsg( "prefs-$key" ) but may be overridden
+&$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may be overridden
'PrefixSearchBackend': Override the title prefix search used for OpenSearch and
AJAX search suggestions. Put results into &$results outparam and return false.
key: $wgDBname:messages, $wgDBname:messages-hash, $wgDBname:messages-status
ex: wikidb:messages, wikidb:messages-hash, wikidb:messages-status
stores: an array where the keys are DB keys and the values are messages
- set in: wfMsg(), Article::editUpdates() and Title::moveTo()
+ set in: wfMessage(), Article::editUpdates() and Title::moveTo()
expriy: $wgMsgCacheExpiry
cleared by: nothing
array_shift( $args );
array_shift( $args );
- $msgHdr = htmlspecialchars( wfMsg( $msg1 ) );
+ $msgHdr = wfMessage( $msg1 )->escaped();
$detailMsgKey = $wgImgAuthDetails ? $msg2 : 'badaccess-group0';
- $detailMsg = htmlspecialchars( wfMsg( $detailMsgKey, $args ) );
+ $detailMsg = wfMessage( $detailMsgKey, $args )->escaped();
wfDebugLog( 'img_auth',
- "wfForbidden Hdr:" . wfMsgExt( $msg1, array( 'language' => 'en' ) ). " Msg: ".
- wfMsgExt( $msg2, array( 'language' => 'en' ), $args )
+ "wfForbidden Hdr:" . wfMessage( $msg1 )->inLanguage( 'en' )->text() . " Msg: ".
+ wfMessage( $msg2, $args )->inLanguage( 'en' )->text()
);
header( 'HTTP/1.0 403 Forbidden' );
*/
private static function reencodeBlob( $blob, $key, $lang ) {
$decoded = FormatJson::decode( $blob, true );
- $decoded[$key] = wfMsgExt( $key, array( 'language' => $lang ) );
+ $decoded[$key] = wfMessage( $key )->inLanguage( $lang )->text();
return FormatJson::encode( (object)$decoded );
}
$messages = array();
foreach ( $module->getMessages() as $key ) {
- $messages[$key] = wfMsgExt( $key, array( 'language' => $lang ) );
+ $messages[$key] = wfMessage( $key )->inLanguage( $lang )->text();
}
return FormatJson::encode( (object)$messages );
global $wgLanguageCode, $wgSitename;
$this->element( 'title', $this->mArticle->getTitle()->getText() );
- $this->pageOrString( 'publisher', wfMsg( 'aboutpage' ), $wgSitename );
+ $this->pageOrString( 'publisher', wfMessage( 'aboutpage' )->text(), $wgSitename );
$this->element( 'language', $wgLanguageCode );
$this->element( 'type', 'Text' );
$this->element( 'format', 'text/html' );
protected function person( $name, User $user ) {
if( $user->isAnon() ){
- $this->element( $name, wfMsgExt( 'anonymous', array( 'parsemag' ), 1 ) );
+ $this->element( $name, wfMessage( 'anonymous' )->numParams( 1 )->text() );
} else {
$real = $user->getRealName();
if( $real ) {
$this->element( $name, $real );
} else {
$userName = $user->getName();
- $this->pageOrString( $name, $user->getUserPage(), wfMsgExt( 'siteuser', 'parsemag', $userName, $userName ) );
+ $this->pageOrString(
+ $name,
+ $user->getUserPage(),
+ wfMessage( 'siteuser', $userName, $userName )->text()
+ );
}
}
}
$reasonstr = $this->mReasonSelection;
if ( $reasonstr != 'other' && $this->mReason != '' ) {
// Entry from drop down menu + additional comment
- $reasonstr .= wfMsgForContent( 'colon-separator' ) . $this->mReason;
+ $reasonstr .= wfMessage( 'colon-separator' )->text() . $this->mReason;
} elseif ( $reasonstr == 'other' ) {
$reasonstr = $this->mReason;
}
function buildForm() {
global $wgUser, $wgLang, $wgOut;
- $mProtectreasonother = Xml::label( wfMsg( 'protectcomment' ), 'wpProtectReasonSelection' );
- $mProtectreason = Xml::label( wfMsg( 'protect-otherreason' ), 'mwProtect-reason' );
+ $mProtectreasonother = Xml::label(
+ wfMessage( 'protectcomment' )->text(),
+ 'wpProtectReasonSelection'
+ );
+ $mProtectreason = Xml::label(
+ wfMessage( 'protect-otherreason' )->text(),
+ 'mwProtect-reason'
+ );
$out = '';
if( !$this->disabled ) {
}
$out .= Xml::openElement( 'fieldset' ) .
- Xml::element( 'legend', null, wfMsg( 'protect-legend' ) ) .
+ Xml::element( 'legend', null, wfMessage( 'protect-legend' )->text() ) .
Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) ) .
Xml::openElement( 'tbody' );
"<tr><td>" . $this->buildSelector( $action, $selected ) . "</td></tr><tr><td>";
$reasonDropDown = Xml::listDropDown( 'wpProtectReasonSelection',
- wfMsgForContent( 'protect-dropdown' ),
- wfMsgForContent( 'protect-otherreason-op' ),
+ wfMessage( 'protect-dropdown' )->inContentLanguage()->text(),
+ wfMessage( 'protect-otherreason-op' )->inContentLanguage()->text(),
$this->mReasonSelection,
'mwProtect-reason', 4 );
- $scExpiryOptions = wfMsgForContent( 'protect-expiry-options' );
+ $scExpiryOptions = wfMessage( 'protect-expiry-options' )->inContentLanguage()->text();
$showProtectOptions = ($scExpiryOptions !== '-' && !$this->disabled);
- $mProtectexpiry = Xml::label( wfMsg( 'protectexpiry' ), "mwProtectExpirySelection-$action" );
- $mProtectother = Xml::label( wfMsg( 'protect-othertime' ), "mwProtect-$action-expires" );
+ $mProtectexpiry = Xml::label(
+ wfMessage( 'protectexpiry' )->text(),
+ "mwProtectExpirySelection-$action"
+ );
+ $mProtectother = Xml::label(
+ wfMessage( 'protect-othertime' )->text(),
+ "mwProtect-$action-expires"
+ );
$expiryFormOptions = '';
if ( $this->mExistingExpiry[$action] && $this->mExistingExpiry[$action] != 'infinity' ) {
$t = $wgLang->time( $this->mExistingExpiry[$action], true );
$expiryFormOptions .=
Xml::option(
- wfMsg( 'protect-existing-expiry', $timestamp, $d, $t ),
+ wfMessage( 'protect-existing-expiry', $timestamp, $d, $t )->text(),
'existing',
$this->mExpirySelection[$action] == 'existing'
) . "\n";
}
- $expiryFormOptions .= Xml::option( wfMsg( 'protect-othertime-op' ), "othertime" ) . "\n";
+ $expiryFormOptions .= Xml::option(
+ wfMessage( 'protect-othertime-op' )->text(),
+ "othertime"
+ ) . "\n";
foreach( explode(',', $scExpiryOptions) as $option ) {
if ( strpos($option, ":") === false ) {
$show = $value = $option;
$out .= '<tr>
<td></td>
<td class="mw-input">' .
- Xml::checkLabel( wfMsg( 'protect-cascade' ), 'mwProtect-cascade', 'mwProtect-cascade',
- $this->mCascade, $this->disabledAttrib ) .
+ Xml::checkLabel(
+ wfMessage( 'protect-cascade' )->text(),
+ 'mwProtect-cascade',
+ 'mwProtect-cascade',
+ $this->mCascade, $this->disabledAttrib
+ ) .
"</td>
</tr>\n";
$out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
<tr>
<td></td>
<td class='mw-input'>" .
- Xml::checkLabel( wfMsg( 'watchthis' ),
+ Xml::checkLabel( wfMessage( 'watchthis' )->text(),
'mwProtectWatch', 'mwProtectWatch',
$this->mTitle->userIsWatching() || $wgUser->getOption( 'watchdefault' ) ) .
"</td>
<tr>
<td></td>
<td class='mw-submit'>" .
- Xml::submitButton( wfMsg( 'confirm' ), array( 'id' => 'mw-Protect-submit' ) ) .
+ Xml::submitButton(
+ wfMessage( 'confirm' )->text(),
+ array( 'id' => 'mw-Protect-submit' )
+ ) .
"</td>
</tr>\n";
$out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' );
$title = Title::makeTitle( NS_MEDIAWIKI, 'Protect-dropdown' );
$link = Linker::link(
$title,
- wfMsgHtml( 'protect-edit-reasonlist' ),
+ wfMessage( 'protect-edit-reasonlist' )->escaped(),
array(),
array( 'action' => 'edit' )
);
*/
private function getOptionLabel( $permission ) {
if( $permission == '' ) {
- return wfMsg( 'protect-default' );
+ return wfMessage( 'protect-default' )->text();
} else {
$msg = wfMessage( "protect-level-{$permission}" );
if( $msg->exists() ) {
return $msg->text();
}
- return wfMsg( 'protect-fallback', $permission );
+ return wfMessage( 'protect-fallback', $permission )->text();
}
}
* @return String
*/
static function makeI18nUrl( $name, $urlaction = '' ) {
- $title = Title::newFromText( wfMsgForContent( $name ) );
+ $title = Title::newFromText( wfMessage( $name )->inContentLanguage()->text() );
self::checkTitle( $title, $name );
return $title->getLocalURL( $urlaction );
}
* @param $message String
*/
function addToSidebar( &$bar, $message ) {
- $this->addToSidebarPlain( $bar, wfMsgForContentNoTrans( $message ) );
+ $this->addToSidebarPlain( $bar, wfMessage( $message )->inContentLanguage()->plain() );
}
/**
$plural = true; // Default if we have a last seen revision: if unknown, use plural
$latestRev = Revision::newFromTitle ($userTalkTitle);
if ( $latestRev !== null ) {
- // Singular if only 1 unseen revision, plural if several unseen revisions.\r
- $plural = $latestRev->getParentId() !== $lastSeenRev->getId();\r
+ // Singular if only 1 unseen revision, plural if several unseen revisions.
+ $plural = $latestRev->getParentId() !== $lastSeenRev->getId();
$nofAuthors = $userTalkTitle->countAuthorsBetween( $lastSeenRev, $latestRev, 10, 'include_new' );
}
} else {
public function doEditSectionLink( Title $nt, $section, $tooltip = null, $lang = false ) {
// HTML generated here should probably have userlangattributes
// added to it for LTR text on RTL pages
+
+ $lang = wfGetLangObj( $lang );
+
$attribs = array();
if ( !is_null( $tooltip ) ) {
# Bug 25462: undo double-escaping.
$tooltip = Sanitizer::decodeCharReferences( $tooltip );
- $attribs['title'] = wfMsgExt( 'editsectionhint', array( 'language' => $lang, 'parsemag', 'replaceafter' ), $tooltip );
+ $attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
+ ->inLanguage( $lang )->text();
}
- $link = Linker::link( $nt, wfMsgExt( 'editsection', array( 'language' => $lang ) ),
+ $link = Linker::link( $nt, wfMessage( 'editsection' )->inLanguage( $lang )->text(),
$attribs,
array( 'action' => 'edit', 'section' => $section ),
array( 'noclasses', 'known' )
# we can rid of it someday.
$attribs = '';
if ( $tooltip ) {
- $attribs = wfMsgExt( 'editsectionhint', array( 'language' => $lang, 'parsemag', 'escape', 'replaceafter' ), $tooltip );
+ $attribs = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
+ ->inLanguage( $lang )->escaped();
$attribs = " title=\"$attribs\"";
}
$result = null;
# run, and even add them to hook-provided text. (This is the main
# reason that the EditSectionLink hook is deprecated in favor of
# DoEditSectionLink: it can't change the brackets or the span.)
- $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language' => $lang ), $result );
+ $result = wfMessage( 'editsection-brackets' )->rawParams( $result )
+ ->inLanguage( $lang )->escaped();
return "<span class=\"editsection\">$result</span>";
}
# Add the brackets and the span, and *then* run the nice new hook, with
# clean and non-redundant arguments.
- $result = wfMsgExt( 'editsection-brackets', array( 'escape', 'replaceafter', 'language' => $lang ), $link );
+ $result = wfMessage( 'editsection-brackets' )->rawParams( $link )
+ ->inLanguage( $lang )->escaped();
$result = "<span class=\"editsection\">$result</span>";
wfRunHooks( 'DoEditSectionLink', array( $this, $nt, $section, $tooltip, &$result, $lang ) );
. $this->getSkin()->escapeSearchLink() . "\">\n"
. '<input type="text" id="searchInput' . $this->searchboxes . '" name="search" size="19" value="'
. htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />\n"
- . '<input type="submit" name="go" value="' . wfMsg( 'searcharticle' ) . '" />';
+ . '<input type="submit" name="go" value="' . wfMessage( 'searcharticle' )->text() . '" />';
if ( $wgUseTwoButtonsSearchForm ) {
- $s .= ' <input type="submit" name="fulltext" value="' . wfMsg( 'searchbutton' ) . "\" />\n";
+ $s .= ' <input type="submit" name="fulltext" value="' . wfMessage( 'searchbutton' )->text() . "\" />\n";
} else {
- $s .= ' <a href="' . $this->getSkin()->escapeSearchLink() . '" rel="search">' . wfMsg( 'powersearch-legend' ) . "</a>\n";
+ $s .= ' <a href="' . $this->getSkin()->escapeSearchLink() . '" rel="search">' . wfMessage( 'powersearch-legend' )->text() . "</a>\n";
}
$s .= '</form>';
}
// @todo FIXME: Is using Language::pipeList impossible here? Do not quite understand the use of the newline
- return implode( $s, wfMsgExt( 'pipe-separator', 'escapenoentities' ) . "\n" );
+ return implode( $s, wfMessage( 'pipe-separator' )->escaped() . "\n" );
}
/**
if ( count( $s ) ) {
global $wgLang;
- $out = wfMsgExt( 'pipe-separator' , 'escapenoentities' );
+ $out = wfMessage( 'pipe-separator' )->escaped();
$out .= $wgLang->pipeList( $s );
}
function bottomLinks() {
global $wgOut, $wgUser;
- $sep = wfMsgExt( 'pipe-separator', 'escapenoentities' ) . "\n";
+ $sep = wfMessage( 'pipe-separator' )->escaped() . "\n";
$s = '';
if ( $wgOut->isArticleRelated() ) {
return '';
}
- $s = wfMsg( 'otherlanguages' ) . wfMsg( 'colon-separator' );
+ $s = wfMessage( 'otherlanguages' )->text() . wfMessage( 'colon-separator' )->text();
$first = true;
if ( $wgLang->isRTL() ) {
foreach ( $a as $l ) {
if ( !$first ) {
- $s .= wfMsgExt( 'pipe-separator', 'escapenoentities' );
+ $s .= wfMessage( 'pipe-separator' )->escaped();
}
$first = false;
$obj->getTitle()->getPrefixedDBkey() );
}
- return Html::rawElement( 'form', array( 'id' => 'specialpages', 'method' => 'get',
- 'action' => $wgScript ), $select->getHTML() . Xml::submitButton( wfMsg( 'go' ) ) );
+ return Html::rawElement( 'form',
+ array( 'id' => 'specialpages', 'method' => 'get', 'action' => $wgScript ),
+ $select->getHTML() . Xml::submitButton( wfMessage( 'go' )->text() ) );
}
function pageTitleLinks() {
if ( 'history' == $action || isset( $diff ) || isset( $oldid ) ) {
$s[] .= Linker::linkKnown(
- $title,
- wfMsg( 'currentrev' )
+ $title,
+ wfMessage( 'currentrev' )->text()
);
}
if ( !$title->equals( $wgUser->getTalkPage() ) ) {
$tl = Linker::linkKnown(
$wgUser->getTalkPage(),
- wfMsgHtml( 'newmessageslink' ),
+ wfMessage( 'newmessageslink' )->escaped(),
array(),
array( 'redirect' => 'no' )
);
$dl = Linker::linkKnown(
$wgUser->getTalkPage(),
- wfMsgHtml( 'newmessagesdifflink' ),
+ wfMessage( 'newmessagesdifflink' )->escaped(),
array(),
array( 'diff' => 'cur' )
);
- $s[] = '<strong>' . wfMsg( 'youhavenewmessages', $tl, $dl ) . '</strong>';
+ $s[] = '<strong>' . wfMessage( 'youhavenewmessages', $tl, $dl )->text() . '</strong>';
# disable caching
$wgOut->setSquidMaxage( 0 );
$wgOut->enableClientCache( false );
if ( $sub == '' ) {
global $wgExtraSubtitle;
- $sub = wfMsgExt( 'tagline', 'parsemag' ) . $wgExtraSubtitle;
+ $sub = wfMessage( 'tagline' )->parse() . $wgExtraSubtitle;
}
$subpages = $this->getSkin()->subPageSubtitle();
if ( !$wgOut->isPrintable() ) {
$printurl = htmlspecialchars( $this->getSkin()->getTitle()->getLocalUrl(
$wgRequest->appendQueryValue( 'printable', 'yes', true ) ) );
- $s[] = "<a href=\"$printurl\" rel=\"alternate\">" . wfMsg( 'printableversion' ) . '</a>';
+ $s[] = "<a href=\"$printurl\" rel=\"alternate\">"
+ . wfMessage( 'printableversion' )->text() . '</a>';
}
if ( $wgOut->isSyndicated() ) {
foreach ( $wgOut->getSyndicationLinks() as $format => $link ) {
$feedurl = htmlspecialchars( $link );
$s[] = "<a href=\"$feedurl\" rel=\"alternate\" type=\"application/{$format}+xml\""
- . " class=\"feedlink\">" . wfMsgHtml( "feed-$format" ) . "</a>";
+ . " class=\"feedlink\">" . wfMessage( "feed-$format" )->escaped() . "</a>";
}
}
return $wgLang->pipeList( $s );
global $wgOut;
if ( !$wgOut->isArticleRelated() ) {
- $s = wfMsg( 'protectedpage' );
+ $s = wfMessage( 'protectedpage' )->text();
} else {
$title = $this->getSkin()->getTitle();
if ( $title->quickUserCan( 'edit' ) && $title->exists() ) {
- $t = wfMsg( 'editthispage' );
+ $t = wfMessage( 'editthispage' )->text();
} elseif ( $title->quickUserCan( 'create' ) && !$title->exists() ) {
- $t = wfMsg( 'create-this-page' );
+ $t = wfMessage( 'create-this-page' )->text();
} else {
- $t = wfMsg( 'viewsource' );
+ $t = wfMessage( 'viewsource' )->text();
}
$s = Linker::linkKnown(
$title = $this->getSkin()->getTitle();
if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) {
- $t = wfMsg( 'deletethispage' );
+ $t = wfMessage( 'deletethispage' )->text();
$s = Linker::linkKnown(
$title,
if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) {
if ( $title->isProtected() ) {
- $text = wfMsg( 'unprotectthispage' );
+ $text = wfMessage( 'unprotectthispage' )->text();
$query = array( 'action' => 'unprotect' );
} else {
- $text = wfMsg( 'protectthispage' );
+ $text = wfMessage( 'protectthispage' )->text();
$query = array( 'action' => 'protect' );
}
if ( $wgOut->isArticleRelated() ) {
if ( $wgUser->isWatched( $title ) ) {
- $text = wfMsg( 'unwatchthispage' );
+ $text = wfMessage( 'unwatchthispage' )->text();
$query = array(
'action' => 'unwatch',
'token' => UnwatchAction::getUnwatchToken( $title, $wgUser ),
);
$id = 'mw-unwatch-link' . $this->mWatchLinkNum;
} else {
- $text = wfMsg( 'watchthispage' );
+ $text = wfMessage( 'watchthispage' )->text();
$query = array(
'action' => 'watch',
'token' => WatchAction::getWatchToken( $title, $wgUser ),
$query
);
} else {
- $s = wfMsg( 'notanarticle' );
+ $s = wfMessage( 'notanarticle' )->text();
}
return $s;
if ( $this->getSkin()->getTitle()->quickUserCan( 'move' ) ) {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Movepage' ),
- wfMsg( 'movethispage' ),
+ wfMessage( 'movethispage' )->text(),
array(),
array( 'target' => $this->getSkin()->getTitle()->getPrefixedDBkey() )
);
function historyLink() {
return Linker::link(
$this->getSkin()->getTitle(),
- wfMsgHtml( 'history' ),
+ wfMessage( 'history' )->escaped(),
array( 'rel' => 'archives' ),
array( 'action' => 'history' )
);
function whatLinksHere() {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Whatlinkshere', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
- wfMsgHtml( 'whatlinkshere' )
+ wfMessage( 'whatlinkshere' )->escaped()
);
}
function userContribsLink() {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Contributions', $this->getSkin()->getTitle()->getDBkey() ),
- wfMsgHtml( 'contributions' )
+ wfMessage( 'contributions' )->escaped()
);
}
function emailUserLink() {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Emailuser', $this->getSkin()->getTitle()->getDBkey() ),
- wfMsgHtml( 'emailuser' )
+ wfMessage( 'emailuser' )->escaped()
);
}
} else {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ),
- wfMsgHtml( 'recentchangeslinked-toolbox' )
+ wfMessage( 'recentchangeslinked-toolbox' )->escaped()
);
}
}
$link = $title->getSubjectPage();
switch( $link->getNamespace() ) {
case NS_MAIN:
- $text = wfMsg( 'articlepage' );
+ $text = wfMessage( 'articlepage' );
break;
case NS_USER:
- $text = wfMsg( 'userpage' );
+ $text = wfMessage( 'userpage' );
break;
case NS_PROJECT:
- $text = wfMsg( 'projectpage' );
+ $text = wfMessage( 'projectpage' );
break;
case NS_FILE:
- $text = wfMsg( 'imagepage' );
+ $text = wfMessage( 'imagepage' );
# Make link known if image exists, even if the desc. page doesn't.
if ( wfFindFile( $link ) )
$linkOptions[] = 'known';
break;
case NS_MEDIAWIKI:
- $text = wfMsg( 'mediawikipage' );
+ $text = wfMessage( 'mediawikipage' );
break;
case NS_TEMPLATE:
- $text = wfMsg( 'templatepage' );
+ $text = wfMessage( 'templatepage' );
break;
case NS_HELP:
- $text = wfMsg( 'viewhelppage' );
+ $text = wfMessage( 'viewhelppage' );
break;
case NS_CATEGORY:
- $text = wfMsg( 'categorypage' );
+ $text = wfMessage( 'categorypage' );
break;
default:
- $text = wfMsg( 'articlepage' );
+ $text = wfMessage( 'articlepage' );
}
} else {
$link = $title->getTalkPage();
- $text = wfMsg( 'talkpage' );
+ $text = wfMessage( 'talkpage' );
}
- $s = Linker::link( $link, $text, array(), array(), $linkOptions );
+ $s = Linker::link( $link, $text->text(), array(), array(), $linkOptions );
return $s;
}
return Linker::linkKnown(
$title,
- wfMsg( 'postcomment' ),
+ wfMessage( 'postcomment' )->text(),
array(),
array(
'action' => 'edit',
if ( $wgUploadNavigationUrl ) {
# Using an empty class attribute to avoid automatic setting of "external" class
- return Linker::makeExternalLink( $wgUploadNavigationUrl, wfMsgHtml( 'upload' ), false, null, array( 'class' => '' ) );
+ return Linker::makeExternalLink( $wgUploadNavigationUrl,
+ wfMessage( 'upload' )->escaped(),
+ false, null, array( 'class' => '' ) );
} else {
return Linker::linkKnown(
SpecialPage::getTitleFor( 'Upload' ),
- wfMsgHtml( 'upload' )
+ wfMessage( 'upload' )->escaped()
);
}
}
$ret .= "$name $talkLink";
} else {
- $ret .= wfMsg( 'notloggedin' );
+ $ret .= wfMessage( 'notloggedin' )->text();
}
$query = array();
: 'login';
$ret .= "\n<br />" . Linker::link(
SpecialPage::getTitleFor( 'Userlogin' ),
- wfMsg( $loginlink ), array(), $query
+ wfMessage( $loginlink )->text(), array(), $query
);
} else {
$talkLink = Linker::link( $wgUser->getTalkPage(),
$ret .= " $talkLink<br />";
$ret .= $wgLang->pipeList( array(
Linker::link(
- SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
+ SpecialPage::getTitleFor( 'Userlogout' ), wfMessage( 'logout' )->text(),
array(), array( 'returnto' => $returnTo->getPrefixedDBkey() )
),
Linker::specialLink( 'Preferences' ),
$ret = $wgLang->pipeList( array(
$ret,
Linker::link(
- Title::newFromText( wfMsgForContent( 'helppage' ) ),
- wfMsg( 'help' )
+ Title::newFromText( wfMessage( 'helppage' )->inContentLanguage()->text() ),
+ wfMessage( 'help' )->text()
),
) );
// Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23
$value = preg_replace( '/^string:/', '', $value );
- $value = wfMsg( $value );
+ $value = wfMessage( $value )->text();
// interpolate variables
$m = array();
while( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {