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
|
description = Description
|
||||||
new=New
|
new=New
|
||||||
date= Date
|
date= Date
|
||||||
dateFormatt=yyyy-MM-dd
|
dateFormat=yyyy-MM-dd
|
||||||
owner=Owner
|
owner=Owner
|
||||||
ownerInformation= Owner Information
|
ownerInformation= Owner Information
|
||||||
owners=Owners
|
owners=Owners
|
||||||
|
@ -25,8 +25,8 @@ updatePet=Update Pet
|
||||||
Visit= Visit
|
Visit= Visit
|
||||||
previousVisits= Previous Visits
|
previousVisits= Previous Visits
|
||||||
addVisit= Add Visit
|
addVisit= Add Visit
|
||||||
visitDate= Visit Date
|
|
||||||
newVisit=New Visit
|
newVisit=New Visit
|
||||||
|
visitDate= Visit Date
|
||||||
petsAndVisits = Pets and Visits
|
petsAndVisits = Pets and Visits
|
||||||
|
|
||||||
name = Name
|
name = Name
|
||||||
|
|
|
@ -3,7 +3,7 @@ title=Clinica de animais
|
||||||
description = Descrição
|
description = Descrição
|
||||||
new=Novo
|
new=Novo
|
||||||
date= Data
|
date= Data
|
||||||
dateFormatt=yyyy-MM-dd
|
dateFormat=dd-MM-yyyy
|
||||||
owner= Proprietário
|
owner= Proprietário
|
||||||
ownerInformation= Informação do Proprietário
|
ownerInformation= Informação do Proprietário
|
||||||
owners=Proprietários
|
owners=Proprietários
|
||||||
|
@ -27,7 +27,6 @@ previousVisits= Visitas Anteriores
|
||||||
addVisit= Adicionar Visita
|
addVisit= Adicionar Visita
|
||||||
newVisit=Nova Visita
|
newVisit=Nova Visita
|
||||||
visitDate= Data da Visita
|
visitDate= Data da Visita
|
||||||
|
|
||||||
petsAndVisits = Animais e Visitas
|
petsAndVisits = Animais e Visitas
|
||||||
|
|
||||||
name = Nome
|
name = Nome
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div th:switch="${type}">
|
<div th:switch="${type}">
|
||||||
<input th:case="'text'" class="form-control" type="text" th:field="*{__${name}__}" />
|
<input th:case="'text'" class="form-control" type="text" th:field="*{__${name}__}" />
|
||||||
<input th:case="'date'" 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))"/>
|
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>
|
</div>
|
||||||
<span th:if="${valid}"
|
<span th:if="${valid}"
|
||||||
|
|
|
@ -46,8 +46,8 @@
|
||||||
<dt th:text="#{name}">Name</dt>
|
<dt th:text="#{name}">Name</dt>
|
||||||
<dd th:text="${pet.name}" /></dd>
|
<dd th:text="${pet.name}" /></dd>
|
||||||
<dt th:text="#{birthDate}">Birth Date</dt>
|
<dt th:text="#{birthDate}">Birth Date</dt>
|
||||||
<dd
|
<dd th:with="dateFormat=#{dateFormat}"
|
||||||
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}" /></dd>
|
th:text="${#temporals.format(pet.birthDate, dateFormat)}" /></dd>
|
||||||
<dt th:text="#{type}">Type</dt>
|
<dt th:text="#{type}">Type</dt>
|
||||||
<dd th:text="${pet.type}" /></dd>
|
<dd th:text="${pet.type}" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr th:each="visit : ${pet.visits}">
|
<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>
|
<td th:text="${visit?.description}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td th:text="${pet.name}" /></td>
|
<td th:text="${pet.name}" /></td>
|
||||||
<td
|
<td th:with="dateFormat=#{dateFormat}"
|
||||||
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}" /></td>
|
th:text="${#temporals.format(pet.birthDate, dateFormat)}" /></td>
|
||||||
<td th:text="${pet.type}" /></td>
|
<td th:text="${pet.type}" /></td>
|
||||||
<td
|
<td
|
||||||
th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" /></td>
|
th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" /></td>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<th th:text="#{description}">Description</th>
|
<th th:text="#{description}">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:if="${!visit['new']}" th:each="visit : ${pet.visits}">
|
<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>
|
<td th:text=" ${visit.description}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue