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

Revision: 113777
Author:   siebrand
Date:     2012-03-13 22:43:14 +0000 (Tue, 13 Mar 2012)
Log Message:
-----------
* Removed groupprefix option from export.php and sync-group.php. Use * wildcard 
with group option.
* Some formatting in README.

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

Modified: trunk/extensions/Translate/README
===================================================================
--- trunk/extensions/Translate/README   2012-03-13 22:41:47 UTC (rev 113776)
+++ trunk/extensions/Translate/README   2012-03-13 22:43:14 UTC (rev 113777)
@@ -30,42 +30,52 @@
  https://translatewiki.net/docs/Translate/html/
 
 == Change log ==
+* 2012-03-13
+- Removed groupprefix option from export.php and sync-group.php. Use * wildcard
+  with group option.
 * 2012-03-12
-* Special:LanguageStats group collapsing now supports nested subgroups
+- Special:LanguageStats group collapsing now supports nested subgroups.
 * 2012-03-11
-- Support for shared TTMServer databases was added
-- Suggestions from different TTMServers are now grouped
-- Output of TTMServer api module has changed
-- TTMServer configs can override the link symbol by adding value for symbol in 
the config
+- Support for shared TTMServer databases was added.
+- Suggestions from different TTMServers are now grouped.
+- Output of TTMServer api module has changed.
+- TTMServer configs can override the link symbol by adding value for symbol in
+  the config.
 * 2012-03-07
-- $wgTranslateGroupStructure is no longer used. If you are using aggregate 
message
-  groups, you can remove the old settings and everything still works as 
expected.
-  If you are not yet using aggregate message groups, you should to not confuse 
users.
-- Gettext file were not shown in translation editor when using recent 
translations task.
-- New Special page AggregateGroups where translation administrator can group 
pages
-  into subgroups.
+- $wgTranslateGroupStructure is no longer used. If you are using aggregate
+  message groups, you can remove the old settings and everything still works as
+  expected. If you are not yet using aggregate message groups, you should do
+  that to not confuse users.
+- Gettext file were not shown in translation editor when using recent
+  translations task.
+- New Special page AggregateGroups where translation administrator can group
+  pages into subgroups.
 * 2012-03-06
-- Translation administrator can now suggest languages translatable page should 
be
-  primarily translated into with a note or preventing other language 
translations.
+- Translation administrator can now suggest languages translatable page should
+  be primarily translated into with a note or preventing other language
+  translations.
 * 2012-03-05
 - Support for using remote TTMServers via API interface added.
-- Support for tmserver was removed. Translate comes with TTMServer enabled by 
default.
-  To bootstrap it with current translations, run php 
scripts/ttmserver-export.php.
-- Message documentation was not shown when translating for subgroups nested 
more than
-  one level deep.
+- Support for tmserver was removed. Translate comes with TTMServer enabled by
+  default. To bootstrap it with current translations, run php
+  scripts/ttmserver-export.php.
+- Message documentation was not shown when translating for subgroups nested 
more
+  than one level deep.
 - Special:TranslationStats can now graph review and reviewer activity.
 * 2012-03-02
 - Encourage/discourage changes of translatable pages are now logged.
 * 2012-03-01
-- Added upper length for translation memory suggestions because of performance 
concerns.
+- Added upper length for translation memory suggestions because of performance
+  concerns.
 * 2012-02-29
-- Configuring wgMainCache is no longer necessary. Translate extension will use 
any
-  available caching mechanism automatically when needed.
+- Configuring wgMainCache is no longer necessary. Translate extension will use
+  any available caching mechanism automatically when needed.
 - Support for Google Translate was removed, as the free service is no more.
-- Special:LanguageStats' default value derived from current interface language 
now
-  works also for anonymous users (only relevant when using LanguageSelector)
+- Special:LanguageStats' default value derived from current interface language
+  now works also for anonymous users (only relevant when using
+  LanguageSelector).
 * 2012-02-24
-- Help link is no longer added twice in Special:SupportedLanguages
+- Help link is no longer added twice in Special:SupportedLanguages.
 * 2012-02-21
 - Gettext headers can now be customised with Translate:GettextFFS:headerFields
   hook. Less headers are modified by default.
@@ -78,18 +88,19 @@
   [[MediaWiki:Tp-custom-<group id>]].
 * 2012-02-13
 - Updated some deprecated function calls
-- New translation memory called TTMServer comes with the extension and is 
enabled
-  by default
+- New translation memory called TTMServer comes with the extension and is
+  enabled by default.
 * 2012-02-11
-- Some missing action- messages added
+- Some missing action- messages added.
 * 2012-02-10
-- New tabbed task-based UI on Special:Translate
+- New tabbed task-based UI on Special:Translate.
 * 2012-02-06
 - API module for message group stats written by Tim Gerundt.
 * 2012-02-01
-- Missing JavaScript dependency added to messagetable
-- No more logging state changes where the state didn't actually change
-- Allow syntax like 
{{Special:MessageGroupStats|group=page-Main/sub|suppresscomplete=1}}
+- Missing JavaScript dependency added to messagetable.
+- No more logging state changes where the state didn't actually change.
+- Allow syntax like
+  {{Special:MessageGroupStats|group=page-Main/sub|suppresscomplete=1}}.
 * 2012-01-31
 - export.php: switch "grouptrail" renamed to "groupprefix" and switch "groups".
   was dropped. "group" now takes a comma separated list of groups IDs, too.

Modified: trunk/extensions/Translate/Translate.php
===================================================================
--- trunk/extensions/Translate/Translate.php    2012-03-13 22:41:47 UTC (rev 
113776)
+++ trunk/extensions/Translate/Translate.php    2012-03-13 22:43:14 UTC (rev 
113777)
@@ -15,7 +15,7 @@
 /**
  * Version number used in extension credits and in other placed where needed.
  */
-define( 'TRANSLATE_VERSION', '2012-03-02' );
+define( 'TRANSLATE_VERSION', '2012-03-13' );
 
 /**
  * Extension credits properties.

Modified: trunk/extensions/Translate/scripts/export.php
===================================================================
--- trunk/extensions/Translate/scripts/export.php       2012-03-13 22:41:47 UTC 
(rev 113776)
+++ trunk/extensions/Translate/scripts/export.php       2012-03-13 22:43:14 UTC 
(rev 113777)
@@ -9,7 +9,7 @@
  * @file
  */
 
-$optionsWithArgs = array( 'lang', 'skip', 'target', 'group', 'groupprefix', 
'threshold', 'ppgettext' );
+$optionsWithArgs = array( 'lang', 'skip', 'target', 'group', 'threshold', 
'ppgettext' );
 require( dirname( __FILE__ ) . '/cli.inc' );
 
 function showUsage() {
@@ -22,9 +22,7 @@
   --target      Target directory for exported files
   --lang        Comma separated list of language codes or *
   --skip        Languages to skip, comma separated list
-  --group       Comma separated list of group IDs (cannot use groupprefix)
-  --groupprefix Prefix of group IDs to be exported message groups (cannot use
-                group)
+  --group       Comma separated list of group IDs (can use * as wildcard)
   --help        This help message
   --threshold   Do not export under this percentage translated
   --ppgettext   Group root path for checkout of product. "msgmerge" will post
@@ -58,8 +56,8 @@
        $skip = array();
 }
 
-if ( !isset( $options['group'] ) && !isset( $options['groupprefix'] ) ) {
-       STDERR( "You need to specify one or more groups using any of the 
options 'group' or 'groupprefix'" );
+if ( !isset( $options['group'] ) ) {
+       STDERR( "You need to specify one or more groups" );
        exit( 1 );
 }
 
@@ -88,13 +86,6 @@
 
 $reqLangs = Cli::parseLanguageCodes( $options['lang'] );
 
-// In case both group and groupprefix would be set, MessageGroups::getGroups
-// will give preference to group. @TODO: get rid of groupprefix
-$groupIds = array();
-if ( isset( $options['groupprefix'] ) ) {
-       $groupIds[] = $options['groupprefix'] . '*';
-}
-
 if ( isset( $options['group'] ) ) {
        $groupIds = explode( ',', trim( $options['group'] ) );
 }

Modified: trunk/extensions/Translate/scripts/sync-group.php
===================================================================
--- trunk/extensions/Translate/scripts/sync-group.php   2012-03-13 22:41:47 UTC 
(rev 113776)
+++ trunk/extensions/Translate/scripts/sync-group.php   2012-03-13 22:43:14 UTC 
(rev 113777)
@@ -13,7 +13,7 @@
 /// @cond
 
 $options         = array( 'git' );
-$optionsWithArgs = array( 'group', 'groupprefix', 'lang', 'start', 'end' );
+$optionsWithArgs = array( 'group', 'lang', 'start', 'end' );
 require( dirname( __FILE__ ) . '/cli.inc' );
 
 # Override the memory limit for wfShellExec, 100 MB seems to be too little for 
svn
@@ -22,11 +22,9 @@
 function showUsage() {
        STDERR( <<<EOT
 Options:
-  --group       Comma separated list of group IDs (cannot use groupprefix)
-  --groupprefix Prefix of group IDs to be exported message groups (cannot use
-                group)
+  --group       Comma separated list of group IDs (can use * as wildcard)
   --git         Use git to retrieve last modified date of i18n files. Will use
-                subversion by default and fallback on filesystem timestamp.
+                subversion by default and fallback on filesystem timestamp
   --lang        Comma separated list of language codes or *
   --norc        Do not add entries to recent changes table
   --help        This help message
@@ -43,18 +41,11 @@
        showUsage();
 }
 
-if ( !isset( $options['group'] ) && !isset( $options['groupprefix'] ) ) {
-       STDERR( "ESG1: Message group id must be supplied with group or 
groupprefix parameter." );
+if ( !isset( $options['group'] ) ) {
+       STDERR( "ESG1: Message group id must be supplied with group parameter." 
);
        exit( 1 );
 }
 
-// In case both group and groupprefix would be set, MessageGroups::getGroups
-// will give preference to group. @TODO: get rid of groupprefix
-$groupIds = array();
-if ( isset( $options['groupprefix'] ) ) {
-       $groupIds[] = $options['groupprefix'] . '*';
-}
-
 if ( isset( $options['group'] ) ) {
        $groupIds = explode( ',', trim( $options['group'] ) );
 }


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

Reply via email to