r110375 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110374‎ | r110375 | r110376 >
Date:10:25, 31 January 2012
Author:siebrand
Status:ok (Comments)
Tags:
Comment:
* 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 (modified) (history)
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/scripts/export.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/export.php
@@ -9,7 +9,7 @@
1010 * @file
1111 */
1212
13 -$optionsWithArgs = array( 'lang', 'skip', 'target', 'group', 'groups', 'groupprefix', 'threshold', 'ppgettext' );
 13+$optionsWithArgs = array( 'lang', 'skip', 'target', 'group', 'groupprefix', 'threshold', 'ppgettext' );
1414 require( dirname( __FILE__ ) . '/cli.inc' );
1515
1616 function showUsage() {
@@ -22,10 +22,9 @@
2323 --target Target directory for exported files
2424 --lang Comma separated list of language codes or *
2525 --skip Languages to skip, comma separated list
26 - --group Group ID (cannot use groups grouptrial)
27 - --groups Group IDs, comma separated list (cannot use group or grouptrial)
 26+ --group Comma separated list of group IDs (cannot use groupprefix)
2827 --groupprefix Prefix of group IDs to be exported message groups (cannot use
29 - group or groups)
 28+ group)
3029 --threshold Do not export under this percentage translated
3130 --ppgettext Group root path for checkout of product. "msgmerge" will post
3231 process on the export result based on the current definitionFile
@@ -58,8 +57,8 @@
5958 $skip = array();
6059 }
6160
62 -if ( !isset( $options['group'] ) && !isset( $options['groups'] ) && !isset( $options['groupprefix'] ) ) {
63 - STDERR( "You need to specify one or more groups using any of the options 'group', 'groups' or 'groupprefix'" );
 61+if ( !isset( $options['group'] ) && !isset( $options['groupprefix'] ) ) {
 62+ STDERR( "You need to specify one or more groups using any of the options 'group' or 'groupprefix'" );
6463 exit( 1 );
6564 }
6665
@@ -91,10 +90,8 @@
9291 $groups = array();
9392
9493 if ( isset( $options['group'] ) ) {
95 - $groups[$options['group']] = MessageGroups::getGroup( $options['group'] );
96 -} elseif ( isset( $options['groups'] ) ) {
9794 // Explode parameter
98 - $groupIds = explode( ',', trim( $options['groups'] ) );
 95+ $groupIds = explode( ',', trim( $options['group'] ) );
9996
10097 // Get groups and add groups to array
10198 foreach ( $groupIds as $groupId ) {
Index: trunk/extensions/Translate/Translate.php
@@ -15,7 +15,7 @@
1616 /**
1717 * Version number used in extension credits and in other placed where needed.
1818 */
19 -define( 'TRANSLATE_VERSION', '2012-01-28' );
 19+define( 'TRANSLATE_VERSION', '2012-01-31' );
2020
2121 /**
2222 * Extension credits properties.
Index: trunk/extensions/Translate/README
@@ -29,6 +29,11 @@
3030 http://translatewiki.net/docs/Translate/html/
3131
3232 == Change log ==
 33+* 2012-01-31
 34+- export.php changes:
 35+ - switch "grouptrail" renamed to "groupprefix"
 36+ - switch "groups" dropped. "group" now takes a comma separated list of group
 37+ IDs, too.
3338 * 2012-01-13
3439 - export.php has a switch "--no-fuzzy" that will filter out fuzzy messages
3540 for file based message groups.

Follow-up revisions

RevisionCommit summaryAuthorDate
r110385Address CR comments:...siebrand13:42, 31 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110373Change "grouptrail" switch to "groupprefix" and update documentation.siebrand10:09, 31 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   10:31, 31 January 2012

If you feel fancy, you could add all the missing change log entries when updating version (which is closest we currently have to releases).

Status & tagging log