Skip to content

Commit 0aabb72

Browse files
committed
internationalized the error and login pages
1 parent 4655650 commit 0aabb72

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

openid-connect-server-webapp/src/main/webapp/WEB-INF/views/error.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<div class="row-fluid">
1111
<div class="offset1 span10">
1212
<div class="hero-unit">
13-
<h1>Error:</h1>
13+
<h1><spring:message code="error.header"/></h1>
1414
<h2 class="text-error"><c:out value="${error.getOAuth2ErrorCode()}" /></h2>
1515
<p>
16-
There was an error processing your request. The server's message was:
16+
<spring:message code="error.message"/>
1717
<blockquote class="text-error"><b><c:out value="${error.message}" /></b></blockquote>
1818
</p>
1919

openid-connect-server-webapp/src/main/webapp/WEB-INF/views/login.jsp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags"%>
22
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
33
<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
4+
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
5+
46
<o:header title="Log In" />
57
<script type="text/javascript">
68
<!--
@@ -15,16 +17,15 @@ $(document).ready(function() {
1517
<o:topbar />
1618
<div class="container-fluid main">
1719

18-
<h1>Login with Username and Password</h1>
20+
<h1><spring:message code="login.login_with_username_and_password"/></h1>
1921

2022
<c:if test="${ param.error != null }">
21-
<div class="alert alert-error">The system was unable to log you
22-
in. Please try again.</div>
23+
<div class="alert alert-error"><spring:message code="login.error"/></div>
2324
</c:if>
2425

2526

2627
<div class="row-fluid">
27-
<div class="span4 offset1 well">
28+
<div class="span6 offset1 well">
2829
<form action="<%=request.getContextPath()%>/j_spring_security_check"
2930
method="POST">
3031
<div>

openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,13 @@
454454
}
455455
},
456456
"error": {
457-
"title": "Error"
457+
"title": "Error",
458+
"header": "Error:",
459+
"message": "There was an error processing your request. The server''s message was:"
460+
},
461+
"login": {
462+
"login_with_username_and_password": "Login with Username and Password",
463+
"error": "The system was unable to log you in. Please try again."
458464
}
459465

460466
}

0 commit comments

Comments
 (0)