diff options
Diffstat (limited to 'src/java/com/juick/http/www/Home.java')
-rw-r--r-- | src/java/com/juick/http/www/Home.java | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index ae82633f..204c35b3 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -24,8 +24,6 @@ import java.io.PrintWriter; import java.net.URLEncoder; import java.sql.Connection; import java.util.ArrayList; -import java.util.Locale; -import java.util.ResourceBundle; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -37,9 +35,6 @@ import javax.servlet.http.HttpServletResponse; public class Home { protected void doGet(Connection sql, Connection sqlSearch, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException { - Locale locale = request.getLocale(); - ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale); - int paramBefore = 0; String paramBeforeStr = request.getParameter("before"); if (paramBeforeStr != null) { @@ -59,25 +54,25 @@ public class Home { String paramShow = request.getParameter("show"); if (paramSearch != null) { - title = rb.getString("Search") + ": " + Utils.encodeHTML(paramSearch); + title = "Поиск: " + Utils.encodeHTML(paramSearch); mids = MessagesQueries.getSearch(sql, sqlSearch, Utils.encodeSphinx(paramSearch), paramBefore); } else if (paramShow == null || paramShow.equals("top")) { - title = rb.getString("Popular"); + title = "Популярные"; mids = MessagesQueries.getPopular(sql, paramBefore); } else if (paramShow.equals("my") && visitor != null) { - title = rb.getString("My feed"); + title = "Моя лента"; mids = MessagesQueries.getMyFeed(sql, visitor.UID, paramBefore); } else if (paramShow.equals("private") && visitor != null) { - title = rb.getString("Private"); + title = "Приватные"; mids = MessagesQueries.getPrivate(sql, visitor.UID, paramBefore); } else if (paramShow.equals("discuss") && visitor != null) { - title = rb.getString("Discussions"); + title = "Обсуждения"; mids = MessagesQueries.getDiscussions(sql, visitor.UID, paramBefore); } else if (paramShow.equals("recommended") && visitor != null) { - title = rb.getString("Recommended"); + title = "Рекомендации"; mids = MessagesQueries.getRecommended(sql, visitor.UID, paramBefore); } else if (paramShow.equals("all")) { - title = rb.getString("Last messages"); + title = "Все сообщения"; if (visitor != null) { mids = MessagesQueries.getAll(sql, visitor.UID, paramBefore); } else { @@ -92,9 +87,9 @@ public class Home { PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, title, null); - PageTemplates.pageNavigation(out, locale, visitor, null); + PageTemplates.pageNavigation(out, visitor, null); - PageTemplates.pageHomeColumn(out, sql, visitor, locale); + PageTemplates.pageHomeColumn(out, sql, visitor); out.println("<section id=\"content\">"); @@ -116,7 +111,7 @@ public class Home { } out.println("<ul>"); - PageTemplates.printMessages(out, sql, null, mids, visitor, locale, visitor == null ? 2 : 3, ad_mid); + PageTemplates.printMessages(out, sql, null, mids, visitor, visitor == null ? 2 : 3, ad_mid); out.println("</ul>"); } @@ -138,8 +133,8 @@ public class Home { out.println("</section>"); - PageTemplates.pageFooter(request, out, locale, visitor, true); - PageTemplates.pageDialogTemplate(out, locale); + PageTemplates.pageFooter(request, out, visitor, true); + PageTemplates.pageDialogTemplate(out); PageTemplates.pageEnd(out); } finally { out.close(); |