mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +00:00
Date Internationalization
This commit is contained in:
parent
ff7ebc490f
commit
e9c224d3f3
5 changed files with 10 additions and 11 deletions
|
@ -3,7 +3,7 @@ title=PetClinic :: a Spring Framework demonstration
|
|||
description = Description
|
||||
new=New
|
||||
date= Date
|
||||
dateFormatt=yyyy-MM-dd
|
||||
dateFormat=yyyy-MM-dd
|
||||
owner=Owner
|
||||
ownerInformation= Owner Information
|
||||
owners=Owners
|
||||
|
@ -25,8 +25,8 @@ updatePet=Update Pet
|
|||
Visit= Visit
|
||||
previousVisits= Previous Visits
|
||||
addVisit= Add Visit
|
||||
visitDate= Visit Date
|
||||
newVisit=New Visit
|
||||
visitDate= Visit Date
|
||||
petsAndVisits = Pets and Visits
|
||||
|
||||
name = Name
|
||||
|
|
|
@ -3,7 +3,7 @@ title=Clinica de animais
|
|||
description = Descrição
|
||||
new=Novo
|
||||
date= Data
|
||||
dateFormatt=yyyy-MM-dd
|
||||
dateFormat=dd-MM-yyyy
|
||||
owner= Proprietário
|
||||
ownerInformation= Informação do Proprietário
|
||||
owners=Proprietários
|
||||
|
@ -27,7 +27,6 @@ previousVisits= Visitas Anteriores
|
|||
addVisit= Adicionar Visita
|
||||
newVisit=Nova Visita
|
||||
visitDate= Data da Visita
|
||||
|
||||
petsAndVisits = Animais e Visitas
|
||||
|
||||
name = Nome
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div th:switch="${type}">
|
||||
<input th:case="'text'" class="form-control" type="text" th:field="*{__${name}__}" />
|
||||
<input th:case="'date'" class="form-control" type="text" th:field="*{__${name}__}"
|
||||
placeholder="YYYY-MM-DD" title="Enter a date in this format: YYYY-MM-DD"
|
||||
th:placeholder="#{dateFormat}" title="Enter a date in this format: #{dateFormat} YYYY-MM-DD"
|
||||
pattern="(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))"/>
|
||||
</div>
|
||||
<span th:if="${valid}"
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
<dt th:text="#{name}">Name</dt>
|
||||
<dd th:text="${pet.name}" /></dd>
|
||||
<dt th:text="#{birthDate}">Birth Date</dt>
|
||||
<dd
|
||||
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}" /></dd>
|
||||
<dd th:with="dateFormat=#{dateFormat}"
|
||||
th:text="${#temporals.format(pet.birthDate, dateFormat)}" /></dd>
|
||||
<dt th:text="#{type}">Type</dt>
|
||||
<dd th:text="${pet.type}" /></dd>
|
||||
</dl>
|
||||
|
@ -61,7 +61,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr th:each="visit : ${pet.visits}">
|
||||
<td th:text="${#temporals.format(visit.date, 'yyyy-MM-dd')}"></td>
|
||||
<td th:with="dateFormat=#{dateFormat}" th:text="${#temporals.format(visit.date, dateFormat)}"></td>
|
||||
<td th:text="${visit?.description}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
</thead>
|
||||
<tr>
|
||||
<td th:text="${pet.name}" /></td>
|
||||
<td
|
||||
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}" /></td>
|
||||
<td th:with="dateFormat=#{dateFormat}"
|
||||
th:text="${#temporals.format(pet.birthDate, dateFormat)}" /></td>
|
||||
<td th:text="${pet.type}" /></td>
|
||||
<td
|
||||
th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" /></td>
|
||||
|
@ -52,7 +52,7 @@
|
|||
<th th:text="#{description}">Description</th>
|
||||
</tr>
|
||||
<tr th:if="${!visit['new']}" th:each="visit : ${pet.visits}">
|
||||
<td th:text="${#temporals.format(visit.date, 'yyyy-MM-dd')}" /></td>
|
||||
<td th:with="dateFormat=#{dateFormat}" th:text="${#temporals.format(visit.date, dateFormat)}" /></td>
|
||||
<td th:text=" ${visit.description}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue