Index: trunk/extensions/Translate/groups/EOL/EOL.yaml |
— | — | @@ -15,8 +15,13 @@ |
16 | 16 | zh-hans: zh-CN |
17 | 17 | zh-hant: zh-TW |
18 | 18 | |
| 19 | + CHECKER: |
| 20 | + class: EOLMessageChecker |
| 21 | + checks: |
| 22 | + - EOLVariablesCheck |
| 23 | + |
19 | 24 | AUTOLOAD: |
20 | | - RubyMessageChecker: Checker.php |
| 25 | + EOLMessageChecker: Checker.php |
21 | 26 | |
22 | 27 | --- |
23 | 28 | BASIC: |
Index: trunk/extensions/Translate/groups/EOL/Checker.php |
— | — | @@ -0,0 +1,27 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Implements MessageChecker for EOL. |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @author Niklas Laxström |
| 8 | + * @copyright Copyright © 2009-2010, Niklas Laxström |
| 9 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
| 10 | + */ |
| 11 | + |
| 12 | +/** |
| 13 | + * Message checks for EOL |
| 14 | + * |
| 15 | + * @ingroup MessageCheckers |
| 16 | + */ |
| 17 | +class EOLMessageChecker extends MessageChecker { |
| 18 | + /** |
| 19 | + * Checks for missing and unknown variables in translations. |
| 20 | + * |
| 21 | + * @param $messages \array Iterable list of TMessage objects. |
| 22 | + * @param $code \string Language code of the translations. |
| 23 | + * @param $warnings \array Array where warnings are appended to. |
| 24 | + */ |
| 25 | + protected function EOLVariablesCheck( $messages, $code, &$warnings ) { |
| 26 | + return parent::parameterCheck( $messages, $code, $warnings, '/%{[a-zA-Z_]+}/' ); |
| 27 | + } |
| 28 | +} |
Property changes on: trunk/extensions/Translate/groups/EOL/Checker.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 29 | + native |
Added: svn:keywords |
2 | 30 | + Id |