Index: trunk/extensions/Translate/scripts/export.php |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | in that location |
34 | 34 | --no-location Only used combined with "ppgettext". This option will rebuild |
35 | 35 | the gettext file without location information. |
| 36 | + --no-fuzzy Do not include any messages marked as fuzzy/outdated. |
36 | 37 | EOT |
37 | 38 | ); |
38 | 39 | exit( 1 ); |
— | — | @@ -79,6 +80,12 @@ |
80 | 81 | $noLocation = ''; |
81 | 82 | } |
82 | 83 | |
| 84 | +if ( isset( $options['no-fuzzy'] ) ) { |
| 85 | + $noFuzzy = true; |
| 86 | +} else { |
| 87 | + $noFuzzy = false; |
| 88 | +} |
| 89 | + |
83 | 90 | $reqLangs = Cli::parseLanguageCodes( $options['lang'] ); |
84 | 91 | |
85 | 92 | $groups = array(); |
— | — | @@ -152,6 +159,11 @@ |
153 | 160 | } |
154 | 161 | |
155 | 162 | $collection->resetForNewLanguage( $lang ); |
| 163 | + |
| 164 | + if ( $noFuzzy ) { |
| 165 | + $collection->filter( 'fuzzy' ); |
| 166 | + } |
| 167 | + |
156 | 168 | $ffs->write( $collection ); |
157 | 169 | |
158 | 170 | // Do post processing if requested. |
— | — | @@ -172,6 +184,10 @@ |
173 | 185 | } |
174 | 186 | } |
175 | 187 | } else { |
| 188 | + if ( $noFuzzy ) { |
| 189 | + STDERR( '--no-fuzzy is not supported for this message group.' ); |
| 190 | + } |
| 191 | + |
176 | 192 | $writer = $group->getWriter(); |
177 | 193 | $writer->fileExport( $langs, $options['target'] ); |
178 | 194 | } |
Index: trunk/extensions/Translate/README |
— | — | @@ -30,6 +30,8 @@ |
31 | 31 | |
32 | 32 | == Change log == |
33 | 33 | * 2012-01-13 |
| 34 | +- export.php has a switch "--no-fuzzy" that will filter out fuzzy messages |
| 35 | + for file based message groups. |
34 | 36 | - Special:PageTranslation has now better error checking for invalid and |
35 | 37 | duplicate translation unit names. |
36 | 38 | - Special pages have now help links. |