changeset 5285:be3d5338f0a3

parser highlight: error message changed
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 16 Nov 2009 02:35:47 +0100
parents a83a65fcbb69
children 668606f6a255
files MoinMoin/parser/highlight.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/highlight.py	Sun Nov 15 22:50:47 2009 +0100
+++ b/MoinMoin/parser/highlight.py	Mon Nov 16 02:35:47 2009 +0100
@@ -150,7 +150,9 @@
             try:
                 lexer = pygments.lexers.get_lexer_by_name(self.syntax)
             except pygments.util.ClassNotFound:
-                msg = _("Lexer \"%s\" not found. Rendering as plain text.") % self.syntax
+                msg = _("Syntax highlighting not supported for '%(syntax)s', see %(highlight_help_page)s.") % {"syntax": self.syntax,
+                                                                                                               "highlight_help_page": "HelpOnSyntaxHighlighting"
+                                                                                                              }
                 lexer = pygments.lexers.TextLexer()
         fmt.result.append(formatter.code_area(1, self._code_id, self.parsername, self.show_nums, self.num_start, self.num_step, msg))
         pygments.highlight(self.raw, lexer, fmt)