r89446 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89445‎ | r89446 | r89447 >
Date:22:14, 3 June 2011
Author:siebrand
Status:ok (Comments)
Tags:
Comment:
Update checker for EOL.
Modified paths:
  • /trunk/extensions/Translate/groups/EOL/Checker.php (added) (history)
  • /trunk/extensions/Translate/groups/EOL/EOL.yaml (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/groups/EOL/EOL.yaml
@@ -15,8 +15,13 @@
1616 zh-hans: zh-CN
1717 zh-hant: zh-TW
1818
 19+ CHECKER:
 20+ class: EOLMessageChecker
 21+ checks:
 22+ - EOLVariablesCheck
 23+
1924 AUTOLOAD:
20 - RubyMessageChecker: Checker.php
 25+ EOLMessageChecker: Checker.php
2126
2227 ---
2328 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
129 + native
Added: svn:keywords
230 + Id

Comments

#Comment by Nikerabbit (talk | contribs)   12:35, 14 June 2011

You probably want to use your name and update the year :)

+ * @copyright Copyright © 2009-2010, Niklas Laxström
#Comment by Siebrand (talk | contribs)   12:50, 14 June 2011

It is just a lame copy, so I claim no copyright.

#Comment by Nikerabbit (talk | contribs)   12:54, 14 June 2011

Fine, too much effort.

Status & tagging log