(bug 24521) Move hard coded "code error!" to messages
authorLiangent <liangent@gmail.com>
Wed, 1 Aug 2012 13:09:41 +0000 (21:09 +0800)
committerLiangent <liangent@gmail.com>
Wed, 1 Aug 2012 16:52:16 +0000 (00:52 +0800)
Change-Id: I43f064ce577da9918fea7430e5bda0853af236e3

languages/LanguageConverter.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 455c64e..77e8249 100644 (file)
@@ -1114,7 +1114,6 @@ class LanguageConverter {
 class ConverterRule {
        var $mText; // original text in -{text}-
        var $mConverter; // LanguageConverter object
-       var $mManualCodeError = '<strong class="error">code error!</strong>';
        var $mRuleDisplay = '';
        var $mRuleTitle = false;
        var $mRules = '';// string : the text of the rules
@@ -1490,7 +1489,9 @@ class ConverterRule {
                        }
                }
                if ( $this->mRuleDisplay === false ) {
-                       $this->mRuleDisplay = $this->mManualCodeError;
+                       $this->mRuleDisplay = '<span class="error">'
+                               . wfMessage( 'converter-manual-rule-error' )->inContentLanguage()->escaped()
+                               . '</span>';
                }
 
                $this->generateConvTable();
index 590f6ac..c378c2c 100644 (file)
@@ -1497,6 +1497,7 @@ These arguments have been omitted.",
 'expansion-depth-exceeded-warning'        => 'Page exceeded the expansion depth',
 'parser-unstrip-loop-warning'             => 'Unstrip loop detected',
 'parser-unstrip-recursion-limit'          => 'Unstrip recursion limit exceeded ($1)',
+'converter-manual-rule-error'             => 'Error detected in manual language conversion rule',
 
 # "Undo" feature
 'undo-success' => 'The edit can be undone.
index f9f7939..ab3d374 100644 (file)
@@ -1069,6 +1069,7 @@ This warning may be encountered due to input text like &lt;ref>&lt;ref>&lt;ref>.
 
 "Unstrip" refers to the internal function of the parser, called \'unstrip\', which recursively puts the output of parser functions in the place of the parser function call and which would enter an infinite loop in the situation above. See also:
 *{{msg-mw|Parser-unstrip-loop-warning}}',
+'converter-manual-rule-error' => 'This message is shown when a manual conversion rule for the language converter has errors. For example it\'s not using the correct syntax, or not supplying text in all variants.',
 
 # "Undo" feature
 'undo-success' => 'Text on special page to confirm edit revert. You arrive on this page by clicking on the "undo" link on a revision history special page.
index 000517f..9d1fca7 100644 (file)
@@ -700,6 +700,7 @@ $wgMessageStructure = array(
                'expansion-depth-exceeded-warning',
                'parser-unstrip-loop-warning',
                'parser-unstrip-recursion-limit',
+               'converter-manual-rule-error',
        ),
        'undo' => array(
                'undo-success',