Index: trunk/extensions/Translate/MessageChecks.php |
— | — | @@ -20,9 +20,10 @@ |
21 | 21 | if ( !isset($pattern[$checkKey]) ) { |
22 | 22 | $list[$key][$checkKey] = '#'; |
23 | 23 | } elseif ( is_array($pattern[$checkKey]) ) { |
24 | | - $list[$key][$checkKey] = array_map( 'strtolower', $pattern[$checkKey] ); |
| 24 | + $list[$key][$checkKey] = |
| 25 | + array_map( array( $this, 'foldValue' ), $pattern[$checkKey] ); |
25 | 26 | } else { |
26 | | - $list[$key][$checkKey] = strtolower( $pattern[$checkKey] ); |
| 27 | + $list[$key][$checkKey] = $this->foldValue( $pattern[$checkKey] ); |
27 | 28 | } |
28 | 29 | } |
29 | 30 | } |
— | — | @@ -33,6 +34,10 @@ |
34 | 35 | $this->group = $group; |
35 | 36 | } |
36 | 37 | |
| 38 | + protected function foldValue( $value ) { |
| 39 | + return str_replace( ' ', '_', strtolower( $value ) ); |
| 40 | + } |
| 41 | + |
37 | 42 | /** |
38 | 43 | * Set the tests for this checker. Array of callables with descriptive keys. |
39 | 44 | * The callbacks will be called with parameters: |
Index: trunk/extensions/Translate/check-blacklist.php |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | ) |
43 | 43 | ), |
44 | 44 | array( |
45 | | - 'group' => 'ext-blahtext', |
| 45 | + 'group' => 'ext-blahtex', |
46 | 46 | 'check' => 'balance', |
47 | 47 | 'message' => array( |
48 | 48 | 'math_MissingOpenBraceAfter', // Contains unbalanced { |