From e7ac47fe500fae3138ea5dc0a4e78917fddf339b Mon Sep 17 00:00:00 2001 From: shirayuki Date: Mon, 18 Mar 2013 19:26:57 +0900 Subject: [PATCH] Add comments for grep (includes/installer/) Change-Id: Idb44b343267978ae214b2cfe9a05947b220629d7 --- includes/installer/DatabaseInstaller.php | 2 ++ includes/installer/Installer.php | 2 ++ includes/installer/MysqlInstaller.php | 6 +++++ includes/installer/WebInstallerPage.php | 28 ++++++++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 3472b7ffbc..8231e7fb85 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -335,6 +335,8 @@ abstract class DatabaseInstaller { * @return String */ public function getReadableName() { + // Give grep a chance to find the usages: + // config-type-mysql, config-type-postgres, config-type-sqlite, config-type-oracle return wfMessage( 'config-type-' . $this->getName() )->text(); } diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 4d8e5f0d77..7ff1ff5a9d 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -643,6 +643,8 @@ abstract class Installer { $allNames = array(); + // Give grep a chance to find the usages: + // config-type-mysql, config-type-postgres, config-type-oracle, config-type-sqlite foreach ( self::getDBTypes() as $name ) { $allNames[] = wfMessage( "config-type-$name" )->text(); } diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index f9a8ce75db..06821f8246 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -361,6 +361,9 @@ class MysqlInstaller extends DatabaseInstaller { } if ( count( $engines ) >= 2 ) { + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-mysql-innodb, config-mysql-myisam $s .= $this->getRadioSet( array( 'var' => '_MysqlEngine', 'label' => 'config-mysql-engine', @@ -385,6 +388,9 @@ class MysqlInstaller extends DatabaseInstaller { // Do charset selector if ( count( $charsets ) >= 2 ) { + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-mysql-binary, config-mysql-utf8 $s .= $this->getRadioSet( array( 'var' => '_MysqlCharset', 'label' => 'config-mysql-charset', diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index f352cf1746..69c98a173a 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -84,12 +84,14 @@ abstract class WebInstallerPage { if ( $continue ) { // Fake submit button for enter keypress (bug 26267) + // Give grep a chance to find the usages: config-continue $s .= Xml::submitButton( wfMessage( "config-$continue" )->text(), array( 'name' => "enter-$continue", 'style' => 'visibility:hidden;overflow:hidden;width:1px;margin:0' ) ) . "\n"; } if ( $back ) { + // Give grep a chance to find the usages: config-back $s .= Xml::submitButton( wfMessage( "config-$back" )->text(), array( 'name' => "submit-$back", @@ -98,6 +100,7 @@ abstract class WebInstallerPage { } if ( $continue ) { + // Give grep a chance to find the usages: config-continue $s .= Xml::submitButton( wfMessage( "config-$continue" )->text(), array( 'name' => "submit-$continue", @@ -452,6 +455,8 @@ class WebInstaller_DBConnect extends WebInstallerPage { $settings = ''; $defaultType = $this->getVar( 'wgDBtype' ); + // Give grep a chance to find the usages: + // config-support-mysql, config-support-postgres, config-support-oracle, config-support-sqlite $dbSupport = ''; foreach( $this->parent->getDBTypes() as $type ) { $link = DatabaseBase::factory( $type )->getSoftwareLink(); @@ -474,6 +479,8 @@ class WebInstaller_DBConnect extends WebInstallerPage { ) . "\n"; + // Give grep a chance to find the usages: + // config-header-mysql, config-header-postgres, config-header-oracle, config-header-sqlite $settings .= Html::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type, 'class' => 'dbWrapper' ) ) . @@ -647,6 +654,9 @@ class WebInstaller_Name extends WebInstallerPage { 'label' => 'config-site-name', 'help' => $this->parent->getHelpBox( 'config-site-name-help' ) ) ) . + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-ns-site-name, config-ns-generic, config-ns-other $this->parent->getRadioSet( array( 'var' => '_NamespaceType', 'label' => 'config-project-namespace', @@ -688,6 +698,9 @@ class WebInstaller_Name extends WebInstallerPage { ) ) . $this->getFieldSetEnd() . $this->parent->getInfoBox( wfMessage( 'config-almost-done' )->text() ) . + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-optional-continue, config-optional-skip $this->parent->getRadioSet( array( 'var' => '_SkipOptional', 'itemLabelPrefix' => 'config-optional-', @@ -831,6 +844,9 @@ class WebInstaller_Options extends WebInstallerPage { $this->startForm(); $this->addHTML( # User Rights + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-profile-wiki, config-profile-no-anon, config-profile-fishbowl, config-profile-private $this->parent->getRadioSet( array( 'var' => '_RightsProfile', 'label' => 'config-profile', @@ -840,6 +856,11 @@ class WebInstaller_Options extends WebInstallerPage { $this->parent->getInfoBox( wfMessage( 'config-profile-help' )->plain() ) . # Licensing + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-license-cc-by, config-license-cc-by-sa, config-license-cc-by-nc-sa, + // config-license-cc-0, config-license-pd, config-license-gfdl, + // config-license-none, config-license-cc-choose $this->parent->getRadioSet( array( 'var' => '_LicenseCode', 'label' => 'config-license', @@ -966,6 +987,9 @@ class WebInstaller_Options extends WebInstallerPage { # Advanced settings $this->getFieldSetStart( 'config-advanced-settings' ) . # Object cache settings + // getRadioSet() builds a set of labeled radio buttons. + // For grep: The following messages are used as the item labels: + // config-cache-none, config-cache-accel, config-cache-memcached $this->parent->getRadioSet( array( 'var' => 'wgMainCacheType', 'label' => 'config-cache-options', @@ -1092,6 +1116,10 @@ class WebInstaller_Options extends WebInstallerPage { return false; } } elseif ( in_array( $code, array_keys( $this->parent->licenses ) ) ) { + // Give grep a chance to find the usages: + // config-license-cc-by, config-license-cc-by-sa, config-license-cc-by-nc-sa, + // config-license-cc-0, config-license-pd, config-license-gfdl, + // config-license-none, config-license-cc-choose $entry = $this->parent->licenses[$code]; if ( isset( $entry['text'] ) ) { $this->setVar( 'wgRightsText', $entry['text'] ); -- 2.20.1