https://www.mediawiki.org/wiki/Special:Code/MediaWiki/110375

Revision: 110375
Author:   siebrand
Date:     2012-01-31 10:25:38 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
* switch "groups" in export.php dropped. "group" now takes a comma separated 
list of group IDs, too.
* follow-up r110373: update some more documentation.
* update Translate date and README.

Modified Paths:
--------------
    trunk/extensions/Translate/README
    trunk/extensions/Translate/Translate.php
    trunk/extensions/Translate/scripts/export.php

Modified: trunk/extensions/Translate/README
===================================================================
--- trunk/extensions/Translate/README   2012-01-31 10:22:17 UTC (rev 110374)
+++ trunk/extensions/Translate/README   2012-01-31 10:25:38 UTC (rev 110375)
@@ -29,6 +29,11 @@
  http://translatewiki.net/docs/Translate/html/
 
 == Change log ==
+* 2012-01-31
+- export.php changes:
+  - switch "grouptrail" renamed to "groupprefix"
+  - switch "groups" dropped. "group" now takes a comma separated list of group
+    IDs, too.
 * 2012-01-13
 - export.php has a switch "--no-fuzzy" that will filter out fuzzy messages
   for file based message groups.

Modified: trunk/extensions/Translate/Translate.php
===================================================================
--- trunk/extensions/Translate/Translate.php    2012-01-31 10:22:17 UTC (rev 
110374)
+++ trunk/extensions/Translate/Translate.php    2012-01-31 10:25:38 UTC (rev 
110375)
@@ -15,7 +15,7 @@
 /**
  * Version number used in extension credits and in other placed where needed.
  */
-define( 'TRANSLATE_VERSION', '2012-01-28' );
+define( 'TRANSLATE_VERSION', '2012-01-31' );
 
 /**
  * Extension credits properties.

Modified: trunk/extensions/Translate/scripts/export.php
===================================================================
--- trunk/extensions/Translate/scripts/export.php       2012-01-31 10:22:17 UTC 
(rev 110374)
+++ trunk/extensions/Translate/scripts/export.php       2012-01-31 10:25:38 UTC 
(rev 110375)
@@ -9,7 +9,7 @@
  * @file
  */
 
-$optionsWithArgs = array( 'lang', 'skip', 'target', 'group', 'groups', 
'groupprefix', 'threshold', 'ppgettext' );
+$optionsWithArgs = array( 'lang', 'skip', 'target', 'group', 'groupprefix', 
'threshold', 'ppgettext' );
 require( dirname( __FILE__ ) . '/cli.inc' );
 
 function showUsage() {
@@ -22,10 +22,9 @@
   --target      Target directory for exported files
   --lang        Comma separated list of language codes or *
   --skip        Languages to skip, comma separated list
-  --group       Group ID (cannot use groups grouptrial)
-  --groups      Group IDs, comma separated list (cannot use group or 
grouptrial)
+  --group       Comma separated list of group IDs (cannot use groupprefix)
   --groupprefix Prefix of group IDs to be exported message groups (cannot use
-                group or groups)
+                group)
   --threshold   Do not export under this percentage translated
   --ppgettext   Group root path for checkout of product. "msgmerge" will post
                 process on the export result based on the current 
definitionFile
@@ -58,8 +57,8 @@
        $skip = array();
 }
 
-if ( !isset( $options['group'] ) && !isset( $options['groups'] ) && !isset( 
$options['groupprefix'] ) ) {
-       STDERR( "You need to specify one or more groups using any of the 
options 'group', 'groups' or 'groupprefix'" );
+if ( !isset( $options['group'] ) && !isset( $options['groupprefix'] ) ) {
+       STDERR( "You need to specify one or more groups using any of the 
options 'group' or 'groupprefix'" );
        exit( 1 );
 }
 
@@ -91,10 +90,8 @@
 $groups = array();
 
 if ( isset( $options['group'] ) ) {
-       $groups[$options['group']] = MessageGroups::getGroup( $options['group'] 
);
-} elseif ( isset( $options['groups'] ) ) {
        // Explode parameter
-       $groupIds = explode( ',', trim( $options['groups'] ) );
+       $groupIds = explode( ',', trim( $options['group'] ) );
 
        // Get groups and add groups to array
        foreach ( $groupIds as $groupId ) {


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to