r102272 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102271‎ | r102272 | r102273 >
Date:08:31, 7 November 2011
Author:raymond
Status:ok
Tags:
Comment:
FU r102136: Use PLURAL, add message documentation, run number through formatNum() for better i18n.
Modified paths:
  • /trunk/extensions/RegexFun/RegexFun.i18n.php (modified) (history)
  • /trunk/extensions/RegexFun/RegexFun.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RegexFun/RegexFun.i18n.php
@@ -18,9 +18,16 @@
1919 $messages['en'] = array(
2020 'regexfun-desc' => 'Adds parser functions allowing the use of regular expressions within wiki pages',
2121 'regexfun-invalid' => 'The regular expression "$1" is invalid.',
22 - 'regexfun-limit-exceed' => 'Maximum of $1 "Regex Fun" regular expression handlings reached.',
 22+ 'regexfun-limit-exceed' => 'Maximum of {{PLURAL:$1|$1 "Regex Fun" regular expression handling|$1 "Regex Fun" regular expression handlings}} reached.',
2323 );
2424
 25+/** Message documentation (Message documentation)
 26+ * @author Daniel Werner
 27+ */
 28+$messages['qqq'] = array(
 29+ 'regexfun-limit-exceed' => '$1 is the in LocalSettings.php defined limit of total Regex Fun function calls (per parser process) dealing with regular expressions.',
 30+);
 31+
2532 /** German (Deutsch)
2633 * @author Daniel Werner
2734 * @author Kghbln
Index: trunk/extensions/RegexFun/RegexFun.php
@@ -220,8 +220,8 @@
221221 }
222222
223223 protected static function msgLimitExceeded() {
224 - global $egRegexFunMaxRegexPerParse;
225 - $msg = '<span class="error">' . wfMsgForContent( 'regexfun-limit-exceed', $egRegexFunMaxRegexPerParse ). '</span>';
 224+ global $egRegexFunMaxRegexPerParse, $wgContLang;
 225+ $msg = '<span class="error">' . wfMsgForContent( 'regexfun-limit-exceed', $wgContLang->formatNum( $$egRegexFunMaxRegexPerParse ) ) . '</span>';
226226 return array( $msg, 'noparse' => true, 'isHTML' => false ); // 'isHTML' must be false for #iferror!
227227 }
228228

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102136Version 1.0.1, configuration variables and settings file added, some cleanup ...danwe01:09, 6 November 2011

Status & tagging log