From e6e54de316a2c5a91a13c4440bd7f4d848e2d940 Mon Sep 17 00:00:00 2001 From: liouxiao Date: Thu, 28 May 2015 07:34:50 +0800 Subject: [PATCH] add more i18n support --- .../resources/messages/messages.properties | 47 +++++++++++++++++++ src/main/webapp/WEB-INF/jsp/exception.jsp | 3 +- .../WEB-INF/jsp/fragments/bodyHeader.jsp | 8 ++-- .../jsp/owners/createOrUpdateOwnerForm.jsp | 23 +++++---- .../webapp/WEB-INF/jsp/owners/findOwners.jsp | 8 ++-- .../WEB-INF/jsp/owners/ownerDetails.jsp | 30 ++++++------ .../webapp/WEB-INF/jsp/owners/ownersList.jsp | 18 ++++--- .../jsp/pets/createOrUpdatePetForm.jsp | 16 ++++--- .../jsp/pets/createOrUpdateVisitForm.jsp | 27 ++++++----- src/main/webapp/WEB-INF/jsp/vets/vetList.jsp | 13 +++-- 10 files changed, 132 insertions(+), 61 deletions(-) diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index 173417a10..f88ee55e9 100644 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -6,3 +6,50 @@ nonNumeric=must be all numeric duplicateFormSubmission=Duplicate form submission is not allowed typeMismatch.date=invalid date typeMismatch.birthDate=invalid date + +home=Home +findOwners=Find owners +veterinarians=Veterinarians +error=Error +new=New + +somethingHappened=Something happened... + +owner=Owner +addOwner=Add Owner +updateOwner=Update Owner +editOwner=Edit Owner +lastName=Last name +firstName=First name +findOwner=Find Owner +ownerInformation=Owner Information + +name=Name +address=Address +city=City +telephone=Telephone +addNewPet=Add New Pet +addPet=Add Pet +updatePet=Update Pet +editPet=Edit Pet +addVisit=Add Visit +petName=Name +petsAndVisits=Pets and Visits +birthDate=Birth Date +type=Type +visitDate=Visit Date +description=Description + +owners=Owners +pets=Pets +pet=Pet + +visit=Visit +addVisit=Add Visit +previousVisits=Previous Visits +date=Date + +viewAsXml=View as XML +viewAsJson=View as JSon + +specialties=Specialties \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/exception.jsp b/src/main/webapp/WEB-INF/jsp/exception.jsp index 876fb04a3..08e19710c 100644 --- a/src/main/webapp/WEB-INF/jsp/exception.jsp +++ b/src/main/webapp/WEB-INF/jsp/exception.jsp @@ -2,6 +2,7 @@ <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> @@ -12,7 +13,7 @@ -

Something happened...

+

${exception.message}

diff --git a/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp b/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp index 207a5b727..0a2e93940 100644 --- a/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp +++ b/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp @@ -8,14 +8,14 @@ diff --git a/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp b/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp index 0479f0bde..c276f9782 100644 --- a/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp @@ -21,22 +21,29 @@

- New Owner +

+ + + + + + + - - - - - + + + + +
- + - +
diff --git a/src/main/webapp/WEB-INF/jsp/owners/findOwners.jsp b/src/main/webapp/WEB-INF/jsp/owners/findOwners.jsp index 91d2ebabc..c2cd975f9 100644 --- a/src/main/webapp/WEB-INF/jsp/owners/findOwners.jsp +++ b/src/main/webapp/WEB-INF/jsp/owners/findOwners.jsp @@ -13,25 +13,25 @@
-

Find Owners

+

- +
- +

- Add Owner + diff --git a/src/main/webapp/WEB-INF/jsp/owners/ownerDetails.jsp b/src/main/webapp/WEB-INF/jsp/owners/ownerDetails.jsp index 4ace4ba23..638149213 100644 --- a/src/main/webapp/WEB-INF/jsp/owners/ownerDetails.jsp +++ b/src/main/webapp/WEB-INF/jsp/owners/ownerDetails.jsp @@ -14,23 +14,23 @@
-

Owner Information

+

- + - + - + - + @@ -38,27 +38,27 @@ - Edit Owner + +
Name
Address
City
Telephone
- Add New Pet
-

Pets and Visits

+

@@ -66,8 +66,8 @@
-
Name
+
-
Birth Date
+
-
Type
+
- - + + @@ -82,14 +82,14 @@ - Edit Pet +
Visit DateDescription
- Add Visit +
diff --git a/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp b/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp index 5e8eaaaaa..55a9b2afd 100644 --- a/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp @@ -13,11 +13,17 @@
-

Owners

+

+ + + + + + - + @@ -26,10 +32,10 @@ - - - - + + + + diff --git a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp index c41f02ddf..810ceb623 100644 --- a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp @@ -1,6 +1,7 @@ <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> @@ -28,18 +29,21 @@

- New - Pet + +

+ + +
- +
- +
@@ -47,10 +51,10 @@
- + - +
diff --git a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp index 501a0d48e..112664418 100644 --- a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdateVisitForm.jsp @@ -21,16 +21,16 @@
-

New Visit

+

- Pet + - - - - + + + + @@ -40,24 +40,27 @@
NameBirth DateTypeOwner
+ + + - - + +
- +

- Previous Visits + - - + + diff --git a/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp b/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp index 040679c28..2eb3096e8 100644 --- a/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp +++ b/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp @@ -14,13 +14,16 @@
-

Veterinarians

+

+ + + - + - + @@ -31,10 +34,10 @@
DateDescription
- ">View as XML + "> - ">View as JSon + ">