Give grep a chance to find the usages
Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
This commit is contained in:
parent
d2386c4f67
commit
b2e2b2e016
18 changed files with 58 additions and 5 deletions
|
|
@ -649,11 +649,6 @@ class CategoryViewer extends ContextSource {
|
|||
* returned? This function says what. Each type is considered independently
|
||||
* of the other types.
|
||||
*
|
||||
* Note for grepping: uses the messages category-article-count,
|
||||
* category-article-count-limited, category-subcat-count,
|
||||
* category-subcat-count-limited, category-file-count,
|
||||
* category-file-count-limited.
|
||||
*
|
||||
* @param int $rescnt The number of items returned by our database query.
|
||||
* @param int $dbcnt The number of items according to the category table.
|
||||
* @param string $type 'subcat', 'article', or 'file'
|
||||
|
|
@ -701,8 +696,12 @@ class CategoryViewer extends ContextSource {
|
|||
$this->cat->refreshCounts();
|
||||
} else {
|
||||
# Case 3: hopeless. Don't give a total count at all.
|
||||
# Give grep a chance to find the usages: category-subcat-count-limited,
|
||||
# category-article-count-limited, category-file-count-limited
|
||||
return $this->msg( "category-$type-count-limited" )->numParams( $rescnt )->parseAsBlock();
|
||||
}
|
||||
# Give grep a chance to find the usages: category-subcat-count-limited,
|
||||
# category-article-count-limited, category-file-count-limited
|
||||
return $this->msg( "category-$type-count" )->numParams( $rescnt, $totalcnt )->parseAsBlock();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -967,6 +967,7 @@ class EditPage {
|
|||
$undoMsg = 'norev';
|
||||
}
|
||||
|
||||
// Give grep a chance to find the usages: undo-success, undo-failure, undo-norev
|
||||
$class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}";
|
||||
$this->editFormPageTop .= $wgOut->parse( "<div class=\"{$class}\">" .
|
||||
wfMessage( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
|
||||
|
|
|
|||
|
|
@ -978,6 +978,8 @@ class Preferences {
|
|||
|
||||
foreach ( $watchTypes as $action => $pref ) {
|
||||
if ( $user->isAllowed( $action ) ) {
|
||||
// Give grep a chance to find the usages:
|
||||
// tog-watchdefault, tog-watchmoves, tog-watchdeletion, tog-watchcreations
|
||||
$defaultPreferences[$pref] = array(
|
||||
'type' => 'toggle',
|
||||
'section' => 'watchlist/advancedwatchlist',
|
||||
|
|
|
|||
|
|
@ -365,6 +365,8 @@ class ProtectionForm {
|
|||
|
||||
foreach ( $this->mRestrictions as $action => $selected ) {
|
||||
/* Not all languages have V_x <-> N_x relation */
|
||||
// Give grep a chance to find the usages:
|
||||
// restriction-edit, restriction-move, restriction-create, restriction-upload
|
||||
$msg = wfMessage( 'restriction-' . $action );
|
||||
$out .= "<tr><td>" .
|
||||
Xml::openElement( 'fieldset' ) .
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ abstract class Skin extends ContextSource {
|
|||
static function getSkinNameMessages() {
|
||||
$messages = array();
|
||||
foreach ( self::getSkinNames() as $skinKey => $skinName ) {
|
||||
// Give grep a chance to find the usages:
|
||||
// skinname-cologneblue, skinname-monobook, skinname-modern, skinname-vector
|
||||
$messages[] = "skinname-$skinKey";
|
||||
}
|
||||
return $messages;
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@ class SkinTemplate extends Skin {
|
|||
if ( $out->isSyndicated() ) {
|
||||
$feeds = array();
|
||||
foreach ( $out->getSyndicationLinks() as $format => $link ) {
|
||||
// Give grep a chance to find the usages: feed-atom, feed-rss
|
||||
$feeds[$format] = array(
|
||||
'text' => $this->msg( "feed-$format" )->text(),
|
||||
'href' => $link
|
||||
|
|
|
|||
|
|
@ -3739,6 +3739,8 @@ class User {
|
|||
} elseif ( $type === true ) {
|
||||
$message = 'confirmemail_body_changed';
|
||||
} else {
|
||||
// Give grep a chance to find the usages:
|
||||
// confirmemail_body_changed, confirmemail_body_set
|
||||
$message = 'confirmemail_body_' . $type;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -752,9 +752,13 @@ class EmailNotification {
|
|||
$postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - ' : $this->summary;
|
||||
|
||||
# Now build message's subject and body
|
||||
# Give grep a chance to find the usages: enotif_subject_deleted, enotif_subject_created,
|
||||
# enotif_subject_moved, enotif_subject_restored, enotif_subject_changed
|
||||
$this->subject = wfMessage( 'enotif_subject_' . $this->pageStatus )->inContentLanguage()
|
||||
->params( $pageTitle, $keys['$PAGEEDITOR'] )->text();
|
||||
|
||||
# Give grep a chance to find the usages: enotif_body_intro_deleted, enotif_body_intro_created,
|
||||
# enotif_body_intro_moved, enotif_body_intro_restored, enotif_body_intro_changed
|
||||
$keys['$PAGEINTRO'] = wfMessage( 'enotif_body_intro_' . $this->pageStatus )
|
||||
->inContentLanguage()->params( $pageTitle, $keys['$PAGEEDITOR'], $pageTitleUrl )
|
||||
->text();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,9 @@ class InfoAction extends FormlessAction {
|
|||
|
||||
// Render page information
|
||||
foreach ( $pageInfo as $header => $infoTable ) {
|
||||
// Give grep a chance to find the usages:
|
||||
// pageinfo-header-basic, pageinfo-header-edits, pageinfo-header-restrictions,
|
||||
// pageinfo-header-properties, pageinfo-category-info
|
||||
$content .= $this->makeHeader( $this->msg( "pageinfo-${header}" )->escaped() ) . "\n";
|
||||
$table = "\n";
|
||||
foreach ( $infoTable as $infoRow ) {
|
||||
|
|
@ -278,6 +281,7 @@ class InfoAction extends FormlessAction {
|
|||
|
||||
// Use robot policy logic
|
||||
$policy = $this->page->getRobotPolicy( 'view', $pOutput );
|
||||
// Give grep a chance to find the usages: pageinfo-robot-index, pageinfo-robot-noindex
|
||||
$pageInfo['header-basic'][] = array(
|
||||
$this->msg( 'pageinfo-robot-policy' ), $this->msg( "pageinfo-robot-${policy['index']}" )
|
||||
);
|
||||
|
|
@ -393,6 +397,8 @@ class InfoAction extends FormlessAction {
|
|||
$message = $this->msg( 'protect-default' )->escaped();
|
||||
} else {
|
||||
// Administrators only
|
||||
// Give grep a chance to find the usages:
|
||||
// protect-level-autoconfirmed, protect-level-sysop
|
||||
$message = $this->msg( "protect-level-$protectionLevel" );
|
||||
if ( $message->isDisabled() ) {
|
||||
// Require "$1" permission
|
||||
|
|
@ -402,6 +408,8 @@ class InfoAction extends FormlessAction {
|
|||
}
|
||||
}
|
||||
|
||||
// Give grep a chance to find the usages:
|
||||
// restriction-edit, restriction-move, restriction-create, restriction-upload
|
||||
$pageInfo['header-restrictions'][] = array(
|
||||
$this->msg( "restriction-$restrictionType" ), $message
|
||||
);
|
||||
|
|
|
|||
|
|
@ -137,6 +137,9 @@ class CliInstaller extends Installer {
|
|||
}
|
||||
|
||||
public function startStage( $step ) {
|
||||
// Give grep a chance to find the usages: config-install-database, config-install-tables,
|
||||
// config-install-interwiki, config-install-stats, config-install-keys, config-install-sysop,
|
||||
// config-install-mainpage
|
||||
$this->showMessage( "config-install-$step" );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -540,6 +540,11 @@ class WebInstaller extends Installer {
|
|||
$s .= "</ul><br/><ul>\n";
|
||||
$s .= $this->getPageListItem( 'Restart', true, $currentPageName );
|
||||
$s .= "</ul></div>\n"; // end list pane
|
||||
// Give grep a chance to find the usages:
|
||||
// config-page-language, config-page-welcome, config-page-dbconnect, config-page-upgrade,
|
||||
// config-page-dbsettings, config-page-name, config-page-options, config-page-install,
|
||||
// config-page-complete, config-page-restart, config-page-readme, config-page-releasenotes,
|
||||
// config-page-copying, config-page-upgradedoc, config-page-existingwiki
|
||||
$s .= Html::element( 'h2', array(),
|
||||
wfMessage( 'config-page-' . strtolower( $currentPageName ) )->text() );
|
||||
|
||||
|
|
@ -557,6 +562,11 @@ class WebInstaller extends Installer {
|
|||
*/
|
||||
private function getPageListItem( $pageName, $enabled, $currentPageName ) {
|
||||
$s = "<li class=\"config-page-list-item\">";
|
||||
// Give grep a chance to find the usages:
|
||||
// config-page-language, config-page-welcome, config-page-dbconnect, config-page-upgrade,
|
||||
// config-page-dbsettings, config-page-name, config-page-options, config-page-install,
|
||||
// config-page-complete, config-page-restart, config-page-readme, config-page-releasenotes,
|
||||
// config-page-copying, config-page-upgradedoc, config-page-existingwiki
|
||||
$name = wfMessage( 'config-page-' . strtolower( $pageName ) )->text();
|
||||
|
||||
if ( $enabled ) {
|
||||
|
|
|
|||
|
|
@ -1219,6 +1219,9 @@ class WebInstaller_Install extends WebInstallerPage {
|
|||
}
|
||||
|
||||
public function startStage( $step ) {
|
||||
// Give grep a chance to find the usages: config-install-database, config-install-tables,
|
||||
// config-install-interwiki, config-install-stats, config-install-keys, config-install-sysop,
|
||||
// config-install-mainpage
|
||||
$this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() );
|
||||
if ( $step == 'extension-tables' ) {
|
||||
$this->startLiveBox();
|
||||
|
|
|
|||
|
|
@ -142,6 +142,8 @@ class DoubleRedirectJob extends Job {
|
|||
$oldUser = $wgUser;
|
||||
$wgUser = $user;
|
||||
$article = WikiPage::factory( $this->title );
|
||||
// Give grep a chance to find the usages:
|
||||
// double-redirect-fixed-move, double-redirect-fixed-maintenance
|
||||
$reason = wfMessage( 'double-redirect-fixed-' . $this->reason,
|
||||
$this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText()
|
||||
)->inContentLanguage()->text();
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ class SpecialJavaScriptTest extends SpecialPage {
|
|||
$out->addHtml( $summary );
|
||||
} elseif ( isset( self::$frameworks[$framework] ) ) {
|
||||
// Matched! Display proper title and initialize the framework
|
||||
// Give grep a chance to find the usages: javascripttest-qunit-name
|
||||
$out->setPageTitle( $this->msg(
|
||||
'javascripttest-title',
|
||||
$this->msg( "javascripttest-$framework-name" )->plain()
|
||||
|
|
@ -92,6 +93,7 @@ class SpecialJavaScriptTest extends SpecialPage {
|
|||
private function getFrameworkListHtml() {
|
||||
$list = '<ul>';
|
||||
foreach ( self::$frameworks as $framework => $initFn ) {
|
||||
// Give grep a chance to find the usages: javascripttest-qunit-name
|
||||
$list .= Html::rawElement(
|
||||
'li',
|
||||
array(),
|
||||
|
|
|
|||
|
|
@ -123,6 +123,8 @@ class SpecialProtectedpages extends SpecialPage {
|
|||
|
||||
$description_items = array();
|
||||
|
||||
// Give grep a chance to find the usages:
|
||||
// restriction-level-sysop, restriction-level-autoconfirmed
|
||||
$protType = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
|
||||
|
||||
$description_items[] = $protType;
|
||||
|
|
@ -308,6 +310,8 @@ class SpecialProtectedpages extends SpecialPage {
|
|||
|
||||
// First pass to load the log names
|
||||
foreach ( Title::getFilteredRestrictionTypes( true ) as $type ) {
|
||||
// Give grep a chance to find the usages:
|
||||
// restriction-edit, restriction-move, restriction-create, restriction-upload
|
||||
$text = $this->msg( "restriction-$type" )->text();
|
||||
$m[$text] = $type;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ class SpecialProtectedtitles extends SpecialPage {
|
|||
|
||||
$link = Linker::link( $title );
|
||||
$description_items = array();
|
||||
// Give grep a chance to find the usages:
|
||||
// restriction-level-sysop, restriction-level-autoconfirmed
|
||||
$protType = $this->msg( 'restriction-level-' . $row->pt_create_perm )->escaped();
|
||||
$description_items[] = $protType;
|
||||
$lang = $this->getLanguage();
|
||||
|
|
@ -183,6 +185,8 @@ class SpecialProtectedtitles extends SpecialPage {
|
|||
// First pass to load the log names
|
||||
foreach ( $wgRestrictionLevels as $type ) {
|
||||
if ( $type != '' && $type != '*' ) {
|
||||
// Give grep a chance to find the usages:
|
||||
// restriction-level-sysop, restriction-level-autoconfirmed
|
||||
$text = $this->msg( "restriction-level-$type" )->text();
|
||||
$m[$text] = $type;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -598,6 +598,7 @@ class UserrightsPage extends SpecialPage {
|
|||
if ( $column === array() ) {
|
||||
continue;
|
||||
}
|
||||
// Give grep a chance to find the usages: userrights-changeable-col, userrights-unchangeable-col
|
||||
$ret .= Xml::element( 'th', null, $this->msg( 'userrights-' . $name . '-col', count( $column ) )->text() );
|
||||
}
|
||||
$ret .= "</tr>\n<tr>\n";
|
||||
|
|
|
|||
|
|
@ -2089,6 +2089,9 @@ class Language {
|
|||
$segments = array();
|
||||
|
||||
foreach ( $intervals as $intervalName => $intervalValue ) {
|
||||
// Give grep a chance to find the usages:
|
||||
// duration-centuries, duration-decades, duration-years, duration-days,
|
||||
// duration-hours, duration-minutes, duration-seconds
|
||||
$message = wfMessage( 'duration-' . $intervalName )->numParams( $intervalValue );
|
||||
$segments[] = $message->inLanguage( $this )->escaped();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue