Shirayuki has uploaded a new change for review.
https://gerrit.wikimedia.org/r/53976
Change subject: Add comments for grep
......................................................................
Add comments for grep
Change-Id: I8c393fb1ca06e15cd99c6aaba64b66b8941314a7
---
M CentralAuth.php
M WikiSet.php
M specials/SpecialCentralAuth.php
M specials/SpecialWikiSets.php
4 files changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/76/53976/1
diff --git a/CentralAuth.php b/CentralAuth.php
index 22428b5..4dd9669 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -371,6 +371,10 @@
$args = array();
}
+ // Give grep a chance to find the usages:
+ // centralauth-rightslog-entry-newset,
centralauth-rightslog-entry-setrename,
+ // centralauth-rightslog-entry-setnewtype,
centralauth-rightslog-entry-setchange,
+ // centralauth-rightslog-entry-deleteset
$msg = wfMessage( "centralauth-rightslog-entry-{$action}", $link
)->params( $args );
if( $skin ) {
return $msg->text();
diff --git a/WikiSet.php b/WikiSet.php
index ac73282..833ca73 100644
--- a/WikiSet.php
+++ b/WikiSet.php
@@ -315,6 +315,8 @@
* @return string
*/
public static function formatType( $type ) {
+ // Give grep a chance to find the usages:
+ // centralauth-rightslog-set-optin,
centralauth-rightslog-set-optout
return wfMessage( "centralauth-rightslog-set-{$type}"
)->escaped();
}
}
diff --git a/specials/SpecialCentralAuth.php b/specials/SpecialCentralAuth.php
index 7fa7af3..d1764c1 100644
--- a/specials/SpecialCentralAuth.php
+++ b/specials/SpecialCentralAuth.php
@@ -367,6 +367,10 @@
function formatMergeMethod( $method ) {
global $wgExtensionAssetsPath;
+ // Give grep a chance to find the usages:
+ // centralauth-merge-method-primary,
centralauth-merge-method-empty, centralauth-merge-method-mail,
+ // centralauth-merge-method-password,
centralauth-merge-method-admin, centralauth-merge-method-new,
+ // centralauth-merge-method-login
$brief = wfMessage( "centralauth-merge-method-{$method}"
)->text();
$html =
Html::element(
@@ -676,6 +680,15 @@
* @return array
*/
function getMergeMethodDescriptions() {
+ // Give grep a chance to find the usages:
+ // centralauth-merge-method-primary,
centralauth-merge-method-new, centralauth-merge-method-empty,
+ // centralauth-merge-method-password,
centralauth-merge-method-mail, centralauth-merge-method-admin,
+ // centralauth-merge-method-login
+ // Give grep a chance to find the usages:
+ // centralauth-merge-method-primary-desc,
centralauth-merge-method-new-desc,
+ // centralauth-merge-method-empty-desc,
centralauth-merge-method-password-desc,
+ // centralauth-merge-method-mail-desc,
centralauth-merge-method-admin-desc,
+ // centralauth-merge-method-login-desc
$mergeMethodDescriptions = array();
foreach ( array( 'primary', 'new', 'empty', 'password', 'mail',
'admin', 'login' ) as $method ) {
$mergeMethodDescriptions[$method] = array(
diff --git a/specials/SpecialWikiSets.php b/specials/SpecialWikiSets.php
index a3538fa..79d59dd 100644
--- a/specials/SpecialWikiSets.php
+++ b/specials/SpecialWikiSets.php
@@ -70,14 +70,17 @@
* @param string $msg
*/
function buildMainView( $msg = '' ) {
+ // Give grep a chance to find the usages:
centralauth-editset-legend-rw, centralauth-editset-legend-ro
$msgPostfix = $this->mCanEdit ? 'rw' : 'ro';
$legend = $this->msg(
"centralauth-editset-legend-{$msgPostfix}" )->text();
$this->getOutput()->addHTML(
"<fieldset><legend>{$legend}</legend>" );
if ( $msg )
$this->getOutput()->addHTML( $msg );
+ // Give grep a chance to find the usages:
centralauth-editset-intro-rw, centralauth-editset-intro-ro
$this->getOutput()->addWikiMsg(
"centralauth-editset-intro-{$msgPostfix}" );
$this->getOutput()->addHTML( '<ul>' );
+ // Give grep a chance to find the usages:
centralauth-editset-item-rw, centralauth-editset-item-ro
$sets = WikiSet::getAllWikiSets();
foreach ( $sets as $set ) {
$text = $this->msg(
"centralauth-editset-item-{$msgPostfix}", $set->getName(), $set->getID()
)->parse();
@@ -180,6 +183,7 @@
$edittoken = Html::hidden( 'wpEditToken',
$this->getUser()->getEditToken() );
$this->getOutput()->addHTML(
"<p>{$edittoken}</p></form></fieldset>" );
} else {
+ // Give grep a chance to find the usages:
centralauth-editset-optin, centralauth-editset-optout
$form = array();
$form['centralauth-editset-name'] = htmlspecialchars(
$name );
$form['centralauth-editset-usage'] = $usage;
@@ -197,6 +201,7 @@
* @return string
*/
function buildTypeSelector( $name, $value ) {
+ // Give grep a chance to find the usages:
centralauth-editset-optin, centralauth-editset-optout
$select = new XmlSelect( $name, 'set-type', $value );
foreach ( array( WikiSet::OPTIN, WikiSet::OPTOUT ) as $type ) {
$select->addOption( $this->msg(
"centralauth-editset-{$type}" )->text(), $type );
--
To view, visit https://gerrit.wikimedia.org/r/53976
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c393fb1ca06e15cd99c6aaba64b66b8941314a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Shirayuki <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits