mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 14:55:51 +00:00
Internationalization Project Layout and messages - Include pt_BR
This commit is contained in:
parent
1561eb5506
commit
ff7ebc490f
11 changed files with 152 additions and 61 deletions
|
@ -1,4 +1,44 @@
|
|||
welcome=Welcome
|
||||
title=PetClinic :: a Spring Framework demonstration
|
||||
description = Description
|
||||
new=New
|
||||
date= Date
|
||||
dateFormatt=yyyy-MM-dd
|
||||
owner=Owner
|
||||
ownerInformation= Owner Information
|
||||
owners=Owners
|
||||
findOwners=Find owners
|
||||
findOwner=Find owner
|
||||
addOwner = Add Owner
|
||||
editOwner = Edit Owner
|
||||
updateOwner = Update Owner
|
||||
|
||||
pet= Pet
|
||||
type = Type
|
||||
pets= Pets
|
||||
newPet= New Pet
|
||||
addPet= Add Pet
|
||||
addNewPet = Add New Pet
|
||||
editPet=Edit Pet
|
||||
updatePet=Update Pet
|
||||
|
||||
Visit= Visit
|
||||
previousVisits= Previous Visits
|
||||
addVisit= Add Visit
|
||||
visitDate= Visit Date
|
||||
newVisit=New Visit
|
||||
petsAndVisits = Pets and Visits
|
||||
|
||||
name = Name
|
||||
birthDate = Birth Date
|
||||
firstName = First Name
|
||||
lastName= Last name
|
||||
address = Address
|
||||
city = City
|
||||
telephone= Telephone
|
||||
veterinarians = Veterinarians
|
||||
specialties= Specialties
|
||||
Error = Error
|
||||
required=is required
|
||||
notFound=has not been found
|
||||
duplicate=is already in use
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
welcome=Willkommen
|
||||
title=Clinica de animais
|
||||
findOwners=Encontrar proprietários
|
||||
required=muss angegeben werden
|
||||
notFound=wurde nicht gefunden
|
||||
duplicate=ist bereits vergeben
|
||||
|
|
49
src/main/resources/messages/messages_pt_BR.properties
Normal file
49
src/main/resources/messages/messages_pt_BR.properties
Normal file
|
@ -0,0 +1,49 @@
|
|||
welcome=Bem vindo
|
||||
title=Clinica de animais
|
||||
description = Descrição
|
||||
new=Novo
|
||||
date= Data
|
||||
dateFormatt=yyyy-MM-dd
|
||||
owner= Proprietário
|
||||
ownerInformation= Informação do Proprietário
|
||||
owners=Proprietários
|
||||
findOwners=Encontrar proprietários
|
||||
findOwner=Encontrar proprietário
|
||||
addOwner = Adicionar proprietário
|
||||
editOwner = Editar proprietário
|
||||
updateOwner = Atualizar proprietário
|
||||
|
||||
pet= Animal
|
||||
type = Espécie
|
||||
pets= Animais
|
||||
newPet= Novo Animal
|
||||
addPet= Adicionar Animal
|
||||
addNewPet = Adicionar Novo Animal
|
||||
editPet=Editar Animal
|
||||
updatePet=Atualizar Animal
|
||||
|
||||
Visit= Visita
|
||||
previousVisits= Visitas Anteriores
|
||||
addVisit= Adicionar Visita
|
||||
newVisit=Nova Visita
|
||||
visitDate= Data da Visita
|
||||
|
||||
petsAndVisits = Animais e Visitas
|
||||
|
||||
name = Nome
|
||||
birthDate = Data Nascimento
|
||||
firstName = Nome
|
||||
lastName = Sobre Nome
|
||||
address = Endereço
|
||||
city = Cidade
|
||||
telephone= Telefone
|
||||
veterinarians= Veterinarios
|
||||
specialties= Especialidades
|
||||
Error = Erro
|
||||
required=é obrigatório
|
||||
notFound=não foi encontrado
|
||||
duplicate=já está em uso
|
||||
nonNumeric=deve ser todo numérico
|
||||
duplicateFormSubmission=Não é permitido o envio de formulários duplicados
|
||||
typeMismatch.date=data inválida
|
||||
typeMismatch.birthDate=data inválida
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<link rel="shortcut icon" type="image/x-icon" th:href="@{/resources/images/favicon.png}">
|
||||
|
||||
<title>PetClinic :: a Spring Framework demonstration</title>
|
||||
<title th:text="#{title}">PetClinic :: a Spring Framework demonstration</title>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
|
@ -49,17 +49,17 @@
|
|||
<span>Home</span>
|
||||
</li>
|
||||
|
||||
<li th:replace="::menuItem ('/owners/find','owners','find owners','search','Find owners')">
|
||||
<li th:replace="::menuItem ('/owners/find','owners','find owners','search',#{findOwners})">
|
||||
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
|
||||
<span>Find owners</span>
|
||||
<span >Find owners</span>
|
||||
</li>
|
||||
|
||||
<li th:replace="::menuItem ('/vets.html','vets','veterinarians','th-list','Veterinarians')">
|
||||
<li th:replace="::menuItem ('/vets.html','vets','veterinarians','th-list',#{veterinarians})">
|
||||
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
|
||||
<span>Veterinarians</span>
|
||||
</li>
|
||||
|
||||
<li th:replace="::menuItem ('/oups','error','trigger a RuntimeException to see how it is handled','warning-sign','Error')">
|
||||
<li th:replace="::menuItem ('/oups','error','trigger a RuntimeException to see how it is handled','warning-sign',#{Error})">
|
||||
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
|
||||
<span>Error</span>
|
||||
</li>
|
||||
|
|
|
@ -3,24 +3,24 @@
|
|||
|
||||
<body>
|
||||
|
||||
<h2>Owner</h2>
|
||||
<h2 th:text="#{owner}">Owner</h2>
|
||||
<form th:object="${owner}" class="form-horizontal" id="add-owner-form" method="post">
|
||||
<div class="form-group has-feedback">
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('First Name', 'firstName', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{firstName}, 'firstName', 'text')}" />
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Last Name', 'lastName', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{lastName}, 'lastName', 'text')}" />
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Address', 'address', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{address}, 'address', 'text')}" />
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('City', 'city', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{city}, 'city', 'text')}" />
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Telephone', 'telephone', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{telephone}, 'telephone', 'text')}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button
|
||||
th:with="text=${owner['new']} ? 'Add Owner' : 'Update Owner'"
|
||||
th:with="text=${owner['new']} ? #{addOwner} : #{updateOwner}"
|
||||
class="btn btn-default" type="submit" th:text="${text}">Add
|
||||
Owner</button>
|
||||
</div>
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
<body>
|
||||
|
||||
<h2>Find Owners</h2>
|
||||
<h2 th:text="#{findOwners}">Find Owners</h2>
|
||||
|
||||
<form th:object="${owner}" th:action="@{/owners}" method="get"
|
||||
class="form-horizontal" id="search-owner-form">
|
||||
<div class="form-group">
|
||||
<div class="control-group" id="lastNameGroup">
|
||||
<label class="col-sm-2 control-label">Last name </label>
|
||||
<label class="col-sm-2 control-label" th:text="#{lastName}">Last name </label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" th:field="*{lastName}" size="30"
|
||||
maxlength="80" /> <span class="help-inline"><div
|
||||
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">Find
|
||||
<button type="submit" class="btn btn-default" th:text="#{findOwner}">Find
|
||||
Owner</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</form>
|
||||
|
||||
<br />
|
||||
<a class="btn btn-default" th:href="@{/owners/new}">Add Owner</a>
|
||||
<a class="btn btn-default" th:href="@{/owners/new}" th:text="#{addOwner}">Add Owner</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -6,49 +6,49 @@
|
|||
<body>
|
||||
|
||||
|
||||
<h2>Owner Information</h2>
|
||||
<h2 th:text="#{ownerInformation}">Owner Information</h2>
|
||||
|
||||
|
||||
<table class="table table-striped" th:object="${owner}">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th th:text="#{name}">Name</th>
|
||||
<td><b th:text="*{firstName + ' ' + lastName}"></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<th th:text="#{address}">Address</th>
|
||||
<td th:text="*{address}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>City</th>
|
||||
<th th:text="#{city}">City</th>
|
||||
<td th:text="*{city}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Telephone</th>
|
||||
<th th:text="#{telephone }">Telephone</th>
|
||||
<td th:text="*{telephone}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a th:href="@{{id}/edit(id=${owner.id})}" class="btn btn-default">Edit
|
||||
<a th:href="@{{id}/edit(id=${owner.id})}" class="btn btn-default" th:text="#{editOwner}">Edit
|
||||
Owner</a>
|
||||
<a th:href="@{{id}/pets/new(id=${owner.id})}" class="btn btn-default">Add
|
||||
<a th:href="@{{id}/pets/new(id=${owner.id})}" class="btn btn-default" th:text="#{addNewPet}">Add
|
||||
New Pet</a>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<h2>Pets and Visits</h2>
|
||||
<h2 th:text="#{petsAndVisits}">Pets and Visits</h2>
|
||||
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr th:each="pet : ${owner.pets}">
|
||||
<td valign="top">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dt th:text="#{name}">Name</dt>
|
||||
<dd th:text="${pet.name}" /></dd>
|
||||
<dt>Birth Date</dt>
|
||||
<dt th:text="#{birthDate}">Birth Date</dt>
|
||||
<dd
|
||||
th:text="${#temporals.format(pet.birthDate, 'yyyy-MM-dd')}" /></dd>
|
||||
<dt>Type</dt>
|
||||
<dt th:text="#{type}">Type</dt>
|
||||
<dd th:text="${pet.type}" /></dd>
|
||||
</dl>
|
||||
</td>
|
||||
|
@ -56,8 +56,8 @@
|
|||
<table class="table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Visit Date</th>
|
||||
<th>Description</th>
|
||||
<th th:text="#{visitDate}">Visit Date</th>
|
||||
<th th:text="#{description}">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr th:each="visit : ${pet.visits}">
|
||||
|
@ -66,10 +66,10 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a
|
||||
th:href="@{{ownerId}/pets/{petId}/edit(ownerId=${owner.id},petId=${pet.id})}">Edit
|
||||
th:href="@{{ownerId}/pets/{petId}/edit(ownerId=${owner.id},petId=${pet.id})}" th:text="#{editPet}">Edit
|
||||
Pet</a></td>
|
||||
<td><a
|
||||
th:href="@{{ownerId}/pets/{petId}/visits/new(ownerId=${owner.id},petId=${pet.id})}">Add
|
||||
th:href="@{{ownerId}/pets/{petId}/visits/new(ownerId=${owner.id},petId=${pet.id})}" th:text="#{addVisit}">Add
|
||||
Visit</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
<body>
|
||||
|
||||
<h2>Owners</h2>
|
||||
<h2 th:text="#{owners}">Owners</h2>
|
||||
|
||||
<table id="owners" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">Name</th>
|
||||
<th style="width: 200px;">Address</th>
|
||||
<th>City</th>
|
||||
<th style="width: 120px">Telephone</th>
|
||||
<th>Pets</th>
|
||||
<th style="width: 150px;" th:text="#{name}">Name</th>
|
||||
<th style="width: 200px;" th:text="#{address}">Address</th>
|
||||
<th th:text="#{city}">City</th>
|
||||
<th style="width: 120px" th:text="#{telephone}">Telephone</th>
|
||||
<th th:text="#{pets}">Pets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -3,30 +3,30 @@
|
|||
|
||||
<body>
|
||||
|
||||
<h2>
|
||||
<th:block th:if="${pet['new']}">New </th:block>
|
||||
Pet
|
||||
<h2 >
|
||||
<th:block th:if="${pet['new']}" th:text="#{newPet}">New </th:block>
|
||||
<!-- Pet -->
|
||||
</h2>
|
||||
<form th:object="${pet}" class="form-horizontal" method="post">
|
||||
<input type="hidden" name="id" th:value="*{id}" />
|
||||
<div class="form-group has-feedback">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Owner</label>
|
||||
<label class="col-sm-2 control-label" th:text="#{owner}">Owner</label>
|
||||
<div class="col-sm-10">
|
||||
<span th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" />
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Name', 'name', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{name}, 'name', 'text')}" />
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Birth Date', 'birthDate', 'date')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{birthDate}, 'birthDate', 'date')}" />
|
||||
<input
|
||||
th:replace="~{fragments/selectField :: select ('Type', 'type', ${types})}" />
|
||||
th:replace="~{fragments/selectField :: select (#{type}, 'type', ${types})}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button
|
||||
th:with="text=${pet['new']} ? 'Add Pet' : 'Update Pet'"
|
||||
th:with="text=${pet['new']} ? #{addPet} : #{updatePet}"
|
||||
class="btn btn-default" type="submit" th:text="${text}">Add
|
||||
Pet</button>
|
||||
</div>
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
<body>
|
||||
|
||||
<h2>
|
||||
<th:block th:if="${visit['new']}">New </th:block>
|
||||
Visit
|
||||
<th:block th:if="${visit['new']}" th:text="#{newVisit}">New </th:block>
|
||||
<!-- Visit -->
|
||||
</h2>
|
||||
|
||||
<b>Pet</b>
|
||||
<b th:text="#{pet}">Pet</b>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Birth Date</th>
|
||||
<th>Type</th>
|
||||
<th>Owner</th>
|
||||
<th th:text="#{name}">Name</th>
|
||||
<th th:text="#{birthDate}">Birth Date</th>
|
||||
<th th:text="#{type}">Type</th>
|
||||
<th th:text="#{owner}">Owner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
|
@ -31,25 +31,25 @@
|
|||
<form th:object="${visit}" class="form-horizontal" method="post">
|
||||
<div class="form-group has-feedback">
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Date', 'date', 'date')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{date}, 'date', 'date')}" />
|
||||
<input
|
||||
th:replace="~{fragments/inputField :: input ('Description', 'description', 'text')}" />
|
||||
th:replace="~{fragments/inputField :: input (#{description}, 'description', 'text')}" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<input type="hidden" name="petId" th:value="${pet.id}" />
|
||||
<button class="btn btn-default" type="submit">Add Visit</button>
|
||||
<button class="btn btn-default" type="submit" th:text="#{addVisit}">Add Visit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<b>Previous Visits</b>
|
||||
<b th:text="#{previousVisits}">Previous Visits</b>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Description</th>
|
||||
<th th:text="#{date}">Date</th>
|
||||
<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>
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
<body>
|
||||
|
||||
<h2>Veterinarians</h2>
|
||||
<h2 th:text="#{veterinarians}">Veterinarians</h2>
|
||||
|
||||
<table id="vets" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Specialties</th>
|
||||
<th th:text="#{name}">Name</th>
|
||||
<th th:text="#{specialties}">Specialties</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
Loading…
Reference in a new issue