From 9af47c10c6a268877c1d232c8d71ee6df4f8a7ab Mon Sep 17 00:00:00 2001
From: Jeroen Baten <jeroen@jeroenbaten.nl>
Date: Fri, 04 Jan 2013 05:18:37 -0500
Subject: [PATCH] Dutch translation before spellcheck

---
 src/com/gitblit/wicket/pages/MarkdownPage.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/com/gitblit/wicket/pages/MarkdownPage.java b/src/com/gitblit/wicket/pages/MarkdownPage.java
index 5764235..e032cbf 100644
--- a/src/com/gitblit/wicket/pages/MarkdownPage.java
+++ b/src/com/gitblit/wicket/pages/MarkdownPage.java
@@ -15,6 +15,7 @@
  */
 package com.gitblit.wicket.pages;
 
+import java.text.MessageFormat;
 import java.text.ParseException;
 
 import org.apache.wicket.PageParameters;
@@ -27,6 +28,7 @@
 import com.gitblit.GitBlit;
 import com.gitblit.utils.JGitUtils;
 import com.gitblit.utils.MarkdownUtils;
+import com.gitblit.utils.StringUtils;
 import com.gitblit.wicket.WicketUtils;
 
 public class MarkdownPage extends RepositoryPage {
@@ -56,8 +58,8 @@
 		try {
 			htmlText = MarkdownUtils.transformMarkdown(markdownText);
 		} catch (ParseException p) {
-			error(p.getMessage());
-			htmlText = markdownText;
+			markdownText = MessageFormat.format("<div class=\"alert alert-error\"><strong>{0}:</strong> {1}</div>{2}", getString("gb.error"), getString("gb.markdownFailure"), markdownText);
+			htmlText = StringUtils.breakLinesForHtml(markdownText);
 		}
 
 		// Add the html to the page

--
Gitblit v1.9.1