Index: trunk/extensions/Translate/scripts/mwcore-export.php |
— | — | @@ -33,22 +33,22 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | if ( !isset( $options['target'] ) ) { |
37 | | - STDERR( "You need to specify target directory" ); |
| 37 | + STDERR( "You need to specify target directory." ); |
38 | 38 | exit( 1 ); |
39 | 39 | } |
40 | 40 | |
41 | 41 | if ( !isset( $options['lang'] ) ) { |
42 | | - STDERR( "You need to specify languages to export" ); |
| 42 | + STDERR( "You need to specify languages to export." ); |
43 | 43 | exit( 1 ); |
44 | 44 | } |
45 | 45 | |
46 | 46 | if ( !isset( $options['type'] ) ) { |
47 | | - STDERR( "Type must be one of the following: special magic namespace" ); |
| 47 | + STDERR( "Type must be one of the following: special magic namespace." ); |
48 | 48 | exit( 1 ); |
49 | 49 | } |
50 | 50 | |
51 | 51 | if ( !is_writable( $options['target'] ) ) { |
52 | | - STDERR( "Target directory is not writable" ); |
| 52 | + STDERR( "Target directory is not writable." ); |
53 | 53 | exit( 1 ); |
54 | 54 | } |
55 | 55 | |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | $o = new NamespaceCM( $l ); |
72 | 72 | break; |
73 | 73 | default: |
74 | | - STDERR( "Invalid type: must be one of special, magic, namespace" ); |
| 74 | + STDERR( "Invalid type: must be one of special, magic, namespace." ); |
75 | 75 | exit( 1 ); |
76 | 76 | } |
77 | 77 | |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | $export = preg_replace( "~^# .*$\n~m", '', $export ); |
92 | 92 | |
93 | 93 | if ( strpos( $export, '#!!' ) !== false ) { |
94 | | - STDERR( "There is warnings with $l" ); |
| 94 | + STDERR( "There are warnings with $l." ); |
95 | 95 | } |
96 | 96 | |
97 | 97 | $variable = preg_quote( $matches[1], '~' ); |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | $file = $group->getMessageFileWithPath( $l ); |
100 | 100 | |
101 | 101 | if ( !file_exists( $file ) ) { |
102 | | - STDERR( "File $file does not exists!" ); |
| 102 | + STDERR( "File $file does not exist!" ); |
103 | 103 | continue; |
104 | 104 | } |
105 | 105 | |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | if ( $count ) { |
116 | 116 | file_put_contents( $outFile, $data ); |
117 | 117 | } else { |
118 | | - STDERR( "Adding new entry to $outFile, please double check location", $l ); |
| 118 | + STDERR( "Adding new entry to $outFile, please double check location.", $l ); |
119 | 119 | $pos = strpos( $data, "*/" ); |
120 | 120 | if ( $pos === false ) { |
121 | 121 | STDERR( ". FAILED! Totally new file? No header?", $l ); |
Index: trunk/extensions/Translate/FFS.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $filename = $this->group->getSourceFilePath( $code ); |
116 | 116 | $input = file_get_contents( $filename ); |
117 | 117 | if ( $input === false ) { |
118 | | - throw new MWException( "Unable to read file $filename" ); |
| 118 | + throw new MWException( "Unable to read file $filename." ); |
119 | 119 | } |
120 | 120 | |
121 | 121 | return $this->readFromVariable( $input ); |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | $parts = explode( "\0\0\0\0", $data ); |
126 | 126 | |
127 | 127 | if ( count( $parts ) !== 2 ) { |
128 | | - throw new MWException( 'Wrong number of parts' ); |
| 128 | + throw new MWException( 'Wrong number of parts.' ); |
129 | 129 | } |
130 | 130 | |
131 | 131 | list( $authorsPart, $messagesPart ) = $parts; |
— | — | @@ -139,7 +139,7 @@ |
140 | 140 | $lineParts = explode( '=', $line, 2 ); |
141 | 141 | |
142 | 142 | if ( count( $lineParts ) !== 2 ) { |
143 | | - throw new MWException( "Wrong number of parts in line $line" ); |
| 143 | + throw new MWException( "Wrong number of parts in line $line." ); |
144 | 144 | } |
145 | 145 | |
146 | 146 | list( $key, $message ) = $lineParts; |
— | — | @@ -159,15 +159,15 @@ |
160 | 160 | $writePath = $this->writePath; |
161 | 161 | |
162 | 162 | if ( $writePath === null ) { |
163 | | - throw new MWException( "Write path is not set" ); |
| 163 | + throw new MWException( "Write path is not set." ); |
164 | 164 | } |
165 | 165 | |
166 | 166 | if ( !file_exists( $writePath ) ) { |
167 | | - throw new MWException( "Write path '$writePath' does not exists" ); |
| 167 | + throw new MWException( "Write path '$writePath' does not exist." ); |
168 | 168 | } |
169 | 169 | |
170 | 170 | if ( !is_writable( $writePath ) ) { |
171 | | - throw new MWException( "Write path '$writePath' is not writable" ); |
| 171 | + throw new MWException( "Write path '$writePath' is not writable." ); |
172 | 172 | } |
173 | 173 | |
174 | 174 | $targetFile = $writePath . '/' . $this->group->getTargetFilename( $collection->code ); |
— | — | @@ -234,12 +234,12 @@ |
235 | 235 | } |
236 | 236 | |
237 | 237 | if ( !is_readable( $filename ) ) { |
238 | | - throw new MWException( "File $filename is not readable" ); |
| 238 | + throw new MWException( "File $filename is not readable." ); |
239 | 239 | } |
240 | 240 | |
241 | 241 | $data = file_get_contents( $filename ); |
242 | 242 | if ( $data == false ) { |
243 | | - throw new MWException( "Unable to read file $filename" ); |
| 243 | + throw new MWException( "Unable to read file $filename." ); |
244 | 244 | } |
245 | 245 | |
246 | 246 | return $data; |
— | — | @@ -333,14 +333,14 @@ |
334 | 334 | } |
335 | 335 | |
336 | 336 | if ( strpos( $line, $this->keySeparator ) === false ) { |
337 | | - throw new MWException( "Line without '{$this->keySeparator}': $line" ); |
| 337 | + throw new MWException( "Line without '{$this->keySeparator}': $line." ); |
338 | 338 | } |
339 | 339 | |
340 | 340 | list( $key, $value ) = explode( $this->keySeparator, $line, 2 ); |
341 | 341 | $key = trim( $key ); |
342 | 342 | |
343 | 343 | if ( $key === '' ) { |
344 | | - throw new MWException( "Empty key in line $line" ); |
| 344 | + throw new MWException( "Empty key in line $line." ); |
345 | 345 | } |
346 | 346 | |
347 | 347 | $value = str_replace( '\n', "\n", $value ); |
— | — | @@ -940,7 +940,7 @@ |
941 | 941 | if ( isset( self::$pluralWords[$key] ) ) { |
942 | 942 | $plurals = true; |
943 | 943 | } elseif ( $plurals ) { |
944 | | - throw new MWException( "Reserved plural keywords mixed with other keys: $key" ); |
| 944 | + throw new MWException( "Reserved plural keywords mixed with other keys: $key." ); |
945 | 945 | } |
946 | 946 | } |
947 | 947 | |
Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -508,7 +508,7 @@ |
509 | 509 | |
510 | 510 | $dbw = wfGetDB( DB_MASTER ); |
511 | 511 | if ( !$dbw->fieldExists( 'translate_sections', 'trs_order', __METHOD__ ) ) { |
512 | | - error_log( 'Field trs_order does not exists. Please run update.php.' ); |
| 512 | + error_log( 'Field trs_order does not exist. Please run update.php.' ); |
513 | 513 | foreach ( array_keys( $inserts ) as $index ) { |
514 | 514 | unset( $inserts[$index]['trs_order'] ); |
515 | 515 | } |
Index: trunk/extensions/Translate/Groups.php |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | } |
162 | 162 | |
163 | 163 | if ( !class_exists( $class ) ) { |
164 | | - throw new MWException( "FFS class $class does not exists" ); |
| 164 | + throw new MWException( "FFS class $class does not exist." ); |
165 | 165 | } |
166 | 166 | |
167 | 167 | return new $class( $this ); |
— | — | @@ -174,14 +174,14 @@ |
175 | 175 | } |
176 | 176 | |
177 | 177 | if ( !class_exists( $class ) ) { |
178 | | - throw new MWException( "Checker class $class does not exists" ); |
| 178 | + throw new MWException( "Checker class $class does not exist." ); |
179 | 179 | } |
180 | 180 | |
181 | 181 | $checker = new $class( $this ); |
182 | 182 | $checks = $this->getFromConf( 'CHECKER', 'checks' ); |
183 | 183 | |
184 | 184 | if ( !is_array( $checks ) ) { |
185 | | - throw new MWException( "Checker class $class not supplied with proper checks" ); |
| 185 | + throw new MWException( "Checker class $class not supplied with proper checks." ); |
186 | 186 | } |
187 | 187 | |
188 | 188 | foreach ( $checks as $check ) { |
— | — | @@ -201,7 +201,7 @@ |
202 | 202 | } |
203 | 203 | |
204 | 204 | if ( !class_exists( $class ) ) { |
205 | | - throw new MWException( "Mangler class $class does not exists" ); |
| 205 | + throw new MWException( "Mangler class $class does not exist." ); |
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | $index = $wgContLang->getNsIndex( $ns ); |
354 | 354 | |
355 | 355 | if ( !$index ) { |
356 | | - throw new MWException( "No valid namespace defined, got $ns" ); |
| 356 | + throw new MWException( "No valid namespace defined, got $ns." ); |
357 | 357 | } |
358 | 358 | |
359 | 359 | return $index; |
— | — | @@ -414,7 +414,7 @@ |
415 | 415 | |
416 | 416 | $pattern = $this->getFromConf( 'FILES', 'sourcePattern' ); |
417 | 417 | if ( $pattern === null ) { |
418 | | - throw new MWException( 'No source file pattern defined' ); |
| 418 | + throw new MWException( 'No source file pattern defined.' ); |
419 | 419 | } |
420 | 420 | |
421 | 421 | return $this->replaceVariables( $pattern, $code ); |
— | — | @@ -424,7 +424,7 @@ |
425 | 425 | $pattern = $this->getFromConf( 'FILES', 'targetPattern' ); |
426 | 426 | |
427 | 427 | if ( $pattern === null ) { |
428 | | - throw new MWException( 'No target file pattern defined' ); |
| 428 | + throw new MWException( 'No target file pattern defined.' ); |
429 | 429 | } |
430 | 430 | |
431 | 431 | return $this->replaceVariables( $pattern, $code ); |
— | — | @@ -486,19 +486,19 @@ |
487 | 487 | $path = $this->getFromConf( 'BASIC', 'metadataPath' ); |
488 | 488 | |
489 | 489 | if ( $path === null ) { |
490 | | - throw new MWException( "metadataPath is not configured" ); |
| 490 | + throw new MWException( "metadataPath is not configured." ); |
491 | 491 | } |
492 | 492 | |
493 | 493 | $filename = "$path/messageTypes.inc"; |
494 | 494 | |
495 | 495 | if ( !is_readable( $filename ) ) { |
496 | | - throw new MWException( "$filename is not readable" ); |
| 496 | + throw new MWException( "$filename is not readable." ); |
497 | 497 | } |
498 | 498 | |
499 | 499 | $data = file_get_contents( $filename ); |
500 | 500 | |
501 | 501 | if ( $data === false ) { |
502 | | - throw new MWException( "Failed to read $filename" ); |
| 502 | + throw new MWException( "Failed to read $filename." ); |
503 | 503 | } |
504 | 504 | |
505 | 505 | $reader = new ConfEditor( $data ); |