r83916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83915‎ | r83916 | r83917 >
Date:16:27, 14 March 2011
Author:siebrand
Status:deferred
Tags:
Comment:
Allow removal of location information in the post-processing export step for gettext files.
Modified paths:
  • /trunk/extensions/Translate/scripts/export.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/export.php
@@ -30,6 +30,8 @@
3131 --ppgettext Group root path for checkout of product. "msgmerge" will post
3232 process on the export result based on the current definitionFile
3333 in that location
 34+ --no-location Only used combined with "ppgettext". This option will rebuild
 35+ the gettext file without location information.
3436 EOT
3537 );
3638 exit( 1 );
@@ -71,6 +73,12 @@
7274 $threshold = false;
7375 }
7476
 77+if ( isset( $options['nolocation'] ) ) {
 78+ $noLocation = '--no-location ';
 79+} else {
 80+ $noLocation = '';
 81+}
 82+
7583 $reqLangs = Cli::parseLanguageCodes( $options['lang'] );
7684
7785 $groups = array();
@@ -146,7 +154,7 @@
147155 if ( $definitionFile ) {
148156 if ( is_file( $definitionFile ) ) {
149157 $targetFileName = $ffs->getWritePath() . $group->getTargetFilename( $collection->code );
150 - $cmd = "msgmerge --quiet --output-file=" . $targetFileName . ' ' . $targetFileName . ' ' . $definitionFile;
 158+ $cmd = "msgmerge --quiet " . $noLocation . "--output-file=" . $targetFileName . ' ' . $targetFileName . ' ' . $definitionFile;
151159 wfShellExec( $cmd, $ret );
152160
153161 // Report on errors.

Follow-up revisions

RevisionCommit summaryAuthorDate
r84161Follow-up r83916: fix typo in option match.siebrand09:47, 17 March 2011

Status & tagging log