r73956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73955‎ | r73956 | r73957 >
Date:16:41, 29 September 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Add documentation.
Modified paths:
  • /trunk/extensions/Translate/groups/StatusNet/genStatusNet-plugins.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/groups/StatusNet/genStatusNet-plugins.php
@@ -1,12 +1,25 @@
22 <?php
33 /**
4 - * Quick script to generate YAML configuration for StatusNet plugins.
 4+ * Script to generate YAML configuration for StatusNet plugins.
 5+ * @see StatusNet-plugins.yaml
56 *
67 * @todo Use Maitenance class and add target option for writing output file.
 8+ * @file
 9+ * @author Siebrand Mazeland
 10+ * @copyright Copyright � 2010 Siebrand Mazeland
 11+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
712 */
813
 14+// Array of found plugins.
915 $plugins = array();
1016
 17+/**
 18+ * Helper method to traverse a path and find plugins.
 19+ *
 20+ * @param $path string Starting path on file system.
 21+ * @param $pattern string Regular expression for files to find in $path.
 22+ * @return array Array of plugins found.
 23+ */
1124 function getPotFiles( $path, $pattern ) {
1225 global $plugins;
1326
@@ -29,11 +42,14 @@
3043 }
3144 }
3245
 46+// translatewiki.net specific base folder.
3347 $baseFolder = '/home/betawiki/projects/statusnet/plugins/';
 48+// File pattern for gettext template files.
3449 $filePattern = '/[.]pot$/';
3550
3651 getPotFiles( $baseFolder, $filePattern );
3752
 53+// Template header for YAML config file.
3854 $header = <<<PHP
3955 TEMPLATE:
4056 BASIC:
@@ -78,6 +94,7 @@
7995 $numberPlugins = count( $plugins );
8096 $count = 0;
8197
 98+// Add config for each plugin.
8299 foreach ( $plugins as $plugin ) {
83100 $pluginL = strtolower( $plugin );
84101

Follow-up revisions

RevisionCommit summaryAuthorDate
r73958Fix encoding of r73956nikerabbit17:09, 29 September 2010

Status & tagging log