translate page titles of search result page and login page
This commit is contained in:
parent
f518e78760
commit
71db92490d
2 changed files with 5 additions and 3 deletions
|
@ -5,12 +5,14 @@ package edu.cornell.mannlib.vitro.webapp.controller.freemarker;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
|
||||
|
||||
/*
|
||||
* Servlet that only specifies a template, without putting any data
|
||||
|
@ -33,7 +35,7 @@ public class StaticPageController extends FreemarkerHttpServlet {
|
|||
String requestedUrl = vreq.getServletPath();
|
||||
String title = null;
|
||||
if (requestedUrl.equals("/login")) {
|
||||
title = "Log in to " + siteName;
|
||||
title = StringUtils.capitalize(I18n.text(vreq, "log_in")) + " - " + siteName;
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
|
|
@ -262,8 +262,8 @@ public class PagedSearchController extends FreemarkerHttpServlet {
|
|||
.getIndividualTemplateModels(individuals, vreq));
|
||||
|
||||
body.put("querytext", queryText);
|
||||
body.put("title", queryText + " - " + appBean.getApplicationName()
|
||||
+ " Search Results");
|
||||
body.put("title", new StringBuilder().append(appBean.getApplicationName()).append(" - ").
|
||||
append(I18n.text(vreq, "search_results_for")).append(" '").append(queryText).append("'").toString());
|
||||
|
||||
body.put("hitCount", hitCount);
|
||||
body.put("startIndex", startIndex);
|
||||
|
|
Loading…
Add table
Reference in a new issue