From 6c5511020457c39961d069071ac60f7140ec724f Mon Sep 17 00:00:00 2001
From: Lukasz Jader <ljaderdev@gmail.com>
Date: Wed, 19 Sep 2012 16:24:10 -0400
Subject: [PATCH] Update polish translation of EmptyRepositoryPage

---
 src/com/gitblit/wicket/WicketUtils.java |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/src/com/gitblit/wicket/WicketUtils.java b/src/com/gitblit/wicket/WicketUtils.java
index 864ebe6..e4eb29f 100644
--- a/src/com/gitblit/wicket/WicketUtils.java
+++ b/src/com/gitblit/wicket/WicketUtils.java
@@ -250,7 +250,7 @@
 			public void renderHead(IHeaderResponse response) {
 				String contentType = "application/rss+xml";
 
-				StringBuffer buffer = new StringBuffer();
+				StringBuilder buffer = new StringBuilder();
 				buffer.append("<link rel=\"alternate\" ");
 				buffer.append("type=\"").append(contentType).append("\" ");
 				buffer.append("title=\"").append(feedTitle).append("\" ");
@@ -274,6 +274,10 @@
 
 	public static PageParameters newTeamnameParameter(String teamname) {
 		return new PageParameters("team=" + teamname);
+	}
+
+	public static PageParameters newProjectParameter(String projectName) {
+		return new PageParameters("p=" + projectName);
 	}
 
 	public static PageParameters newRepositoryParameter(String repositoryName) {
@@ -353,6 +357,10 @@
 				+ ",st=" + type.name() + ",pg=" + pageNumber);
 	}
 
+	public static String getProjectName(PageParameters params) {
+		return params.getString("p", "");
+	}
+
 	public static String getRepositoryName(PageParameters params) {
 		return params.getString("r", "");
 	}
@@ -418,7 +426,7 @@
 		return params.getString("n", "");
 	}
 
-	public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone) {
+	public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {
 		String format = GitBlit.getString(Keys.web.datestampShortFormat, "MM/dd/yy");
 		DateFormat df = new SimpleDateFormat(format);
 		if (timeZone == null) {
@@ -434,7 +442,7 @@
 		String title = null;
 		if (date.getTime() <= System.currentTimeMillis()) {
 			// past
-			title = TimeUtils.timeAgo(date);
+			title = timeUtils.timeAgo(date);
 		}
 		if ((System.currentTimeMillis() - date.getTime()) < 10 * 24 * 60 * 60 * 1000L) {
 			String tmp = dateString;
@@ -442,14 +450,14 @@
 			title = tmp;
 		}
 		Label label = new Label(wicketId, dateString);
-		WicketUtils.setCssClass(label, TimeUtils.timeAgoCss(date));
+		WicketUtils.setCssClass(label, timeUtils.timeAgoCss(date));
 		if (!StringUtils.isEmpty(title)) {
 			WicketUtils.setHtmlTooltip(label, title);
 		}
 		return label;
 	}
 
-	public static Label createTimeLabel(String wicketId, Date date, TimeZone timeZone) {
+	public static Label createTimeLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {
 		String format = GitBlit.getString(Keys.web.timeFormat, "HH:mm");
 		DateFormat df = new SimpleDateFormat(format);
 		if (timeZone == null) {
@@ -462,7 +470,7 @@
 		} else {
 			timeString = df.format(date);
 		}
-		String title = TimeUtils.timeAgo(date);
+		String title = timeUtils.timeAgo(date);
 		Label label = new Label(wicketId, timeString);
 		if (!StringUtils.isEmpty(title)) {
 			WicketUtils.setHtmlTooltip(label, title);
@@ -470,7 +478,7 @@
 		return label;
 	}
 
-	public static Label createDatestampLabel(String wicketId, Date date, TimeZone timeZone) {
+	public static Label createDatestampLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {
 		String format = GitBlit.getString(Keys.web.datestampLongFormat, "EEEE, MMMM d, yyyy");
 		DateFormat df = new SimpleDateFormat(format);
 		if (timeZone == null) {
@@ -485,12 +493,12 @@
 		}
 		String title = null;
 		if (TimeUtils.isToday(date)) {
-			title = "today";
+			title = timeUtils.today();
 		} else if (TimeUtils.isYesterday(date)) {
-				title = "yesterday";
+				title = timeUtils.yesterday();
 		} else if (date.getTime() <= System.currentTimeMillis()) {
 			// past
-			title = TimeUtils.timeAgo(date);
+			title = timeUtils.timeAgo(date);
 		}
 		if ((System.currentTimeMillis() - date.getTime()) < 10 * 24 * 60 * 60 * 1000L) {
 			String tmp = dateString;
@@ -504,7 +512,7 @@
 		return label;
 	}
 
-	public static Label createTimestampLabel(String wicketId, Date date, TimeZone timeZone) {
+	public static Label createTimestampLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {
 		String format = GitBlit.getString(Keys.web.datetimestampLongFormat,
 				"EEEE, MMMM d, yyyy HH:mm Z");
 		DateFormat df = new SimpleDateFormat(format);
@@ -521,7 +529,7 @@
 		String title = null;
 		if (date.getTime() <= System.currentTimeMillis()) {
 			// past
-			title = TimeUtils.timeAgo(date);
+			title = timeUtils.timeAgo(date);
 		}
 		Label label = new Label(wicketId, dateString);
 		if (!StringUtils.isEmpty(title)) {

--
Gitblit v1.9.1