Skip to content

Commit

Permalink
Translating every page to english
Browse files Browse the repository at this point in the history
Signed-off-by: GEdO23 <rm99632@fiap.com.br>
  • Loading branch information
GEdO23 committed Oct 10, 2024
1 parent 8ae7da3 commit 66b1048
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 60 deletions.
55 changes: 49 additions & 6 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
@@ -1,28 +1,71 @@
# Miscellaneous
welcome_message=Seja muito bem vindo ao Cutcute Petshop Spring Boot API!
help_contact_message=Caso necessite de ajuda, entrar em contato com
help_contact_name=Gabriel Eringer de Oliveira
access_denied=Acesso Negado
details_of=Detalhes de

# Endpoints
endpoint_home=pagina_principal
endpoint_error_403=acesso_negado
endpoint_pet_list=lista_pets
endpoint_pet_register=formulario_cadastrar_pet
endpoint_race_list=lista_racas
endpoint_race_register=formulario_cadastrar_raca

# Nav
nav_pet_list=Pets
nav_race_list=Raças
btn_logout=Sair

# Success/Error messages
logout_message_success=Logout efetuado com sucesso
login_message_error=Usuário ou senha inválido

# Labels
login_user_name_label=Nome
login_user_password_label=Senha
btn_login=Entrar
login_page_title=Login
pet_name_label=Nome
pet_race_label=Raça
pet_race_description_label=Descrição da raça
race_name_label=Nome
race_description_label=Descrição

# Page titles
home_page_title=CPSB API
login_page_title=Login

pet_list_page_title=Lista de Pets
race_list_page_title=Lista de Raças
race_register_page_title=Cadastrar Raça
pet_register_page_title=Cadastrar Pet
pet_update_page_title=Atualizar Pet
error_page_title=Erro
erro_403_page_title=Acesso Negado
pet_details_page_title=Detalhes de Pet

race_list_page_title=Lista de Raças
race_register_page_title=Cadastrar Raça
race_details_page_title=Detalhes de Raça

error_page_title=Erro

# Buttons
btn_login=Entrar
btn_send=Enviar

# CRUD
register=Cadastrar
details=Detalhes
update=Atualizar
remove=Remover

pet_register=Cadastrar pet
race_register=Cadastrar raça

# Go to
go_back_home=Voltar para página principal
go_back_pet_list=Voltar para a lista de pets
go_back_race_list=Voltar para lista de raças

# Errors
error_403_title=Erro 403!
error_403_message=Parece que você não tem permissão para acessar este conteúdo.
error_generic_title=Erro encontrado

62 changes: 52 additions & 10 deletions src/main/resources/messages_en.properties
Original file line number Diff line number Diff line change
@@ -1,28 +1,70 @@
welcome_message=Welcome to the Cutcute Petshop Spring Boot API!
# Miscellaneous
welcome_message=Welcome to Cutcute Petshop Spring Boot API!
help_contact_message=If you need help, contact
help_contact_name=Gabriel Eringer de Oliveira
access_denied=Access Denied
details_of=Details of

# Endpoints
endpoint_home=pagina_principal
endpoint_error_403=acesso_negado
endpoint_pet_list=lista_pets
endpoint_pet_register=formulario_cadastrar_pet
endpoint_race_list=lista_racas
endpoint_race_register=formulario_cadastrar_raca

# Nav
nav_pet_list=Pets
nav_race_list=Races
btn_logout=Exit
logout_message_success=Logout successfully completed

# Success/Error messages
logout_message_success=Logout successful
login_message_error=Invalid username or password
login_user_name_label=Name

# Labels
login_user_name_label=Username
login_user_password_label=Password
btn_login=Enter
login_page_title=Login
pet_name_label=Name
pet_race_label=Race
pet_race_description_label=Race description
race_name_label=Name
race_description_label=Description

# Page titles
home_page_title=CPSB API
login_page_title=Login

pet_list_page_title=Pet List
race_list_page_title=Race List
race_register_page_title=Register Race
pet_register_page_title=Register Pet
pet_update_page_title=Update Pet
error_page_title=Error
erro_403_page_title=Access Denied
pet_details_page_title=Pet Details
race_details_page_title=Race Details

race_list_page_title=Race List
race_register_page_title=Register Race
race_details_page_title=Race Details

error_page_title=Error

# Buttons
btn_login=Login
btn_send=Send

# CRUD
register=Register
details=Details
update=Update
remove=Remove

pet_register=Register pet
race_register=Register race

# Go to
go_back_home=Go back to home page
go_back_pet_list=Go back to pet list
go_back_race_list=Go back to race list

# Errors
error_403_title=Error 403!
error_403_message=It seems you do not have permission to access this content.
error_generic_title=Error found
13 changes: 8 additions & 5 deletions src/main/resources/templates/detalhes_pet.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,32 @@

<div class="container mt-5">
<div class="row">
<h1>Detalhes de <span th:text="${pet.nome}"></span></h1>
<h1>
<span th:text="#{details_of} "></span>
<span th:text="${pet.nome}"></span>
</h1>
</div>

<div class="row">
<table class="table table-hover">

<tr>

<td class="col-2">Nome</td>
<td class="col-2" th:text="#{pet_name_label}"></td>
<td><span th:text="${pet.nome}"></span></td>

</tr>

<tr>

<td class="col-2">Raça</td>
<td class="col-2" th:text="#{pet_race_label}"></td>
<td><span th:text="${pet.raca.nome}"></span></td>

</tr>

<tr>

<td class="col-2">Descrição da raça</td>
<td class="col-2" th:text="#{pet_race_description_label}"></td>
<td><span th:text="${pet.raca.descricao}"></span></td>

</tr>
Expand All @@ -49,7 +52,7 @@ <h1>Detalhes de <span th:text="${pet.nome}"></span></h1>
</div>

<div class="row">
<a href="/lista_pets">Voltar para a lista de pets</a>
<a href="/lista_pets" th:text="#{go_back_pet_list}"></a>
</div>
</div>

Expand Down
11 changes: 7 additions & 4 deletions src/main/resources/templates/detalhes_raca.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,25 @@

<div class="container mt-5">
<div class="row">
<h1>Detalhes de <span th:text="${raca.nome}"></span></h1>
<h1>
<span th:text="#{details_of} "></span>
<span th:text="${raca.nome}"></span>
</h1>
</div>

<div class="row">
<table class="table table-hover">

<tr>

<td class="col-2">Nome</td>
<td class="col-2" th:text="#{race_name_label}">Nome</td>
<td><span th:text="${raca.nome}"></span></td>

</tr>

<tr>

<td class="col-2">Descrição</td>
<td class="col-2" th:text="#{race_description_label}"></td>
<td><span th:text="${raca.descricao}"></span></td>

</tr>
Expand All @@ -43,7 +46,7 @@ <h1>Detalhes de <span th:text="${raca.nome}"></span></h1>

<div class="row gap-2">
<div class="col-auto">
<a href="/lista_racas">Voltar para a lista de raças</a>
<a href="/lista_racas" th:text="#{go_back_race_list}"></a>
</div>
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/main/resources/templates/erro_403.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1"
crossorigin="anonymous">

<title th:text="#{erro_403_page_title}"></title>
<title th:text="#{access_denied}"></title>
</head>
<body>

<div th:replace="~{fragmentos :: navbar(#{endpoint_error_403})}"></div>

<div class="jumbotron jumbotron-fluid mt-5">
<div class="container">
<h1 class="display-6">Erro 403!</h1>
<p>Parece que você não tem permissão para acessar este conteúdo.</p>
<h1 class="display-6" th:text="#{error_403_title}">Erro 403!</h1>
<p th:text="#{error_403_message}">Parece que você não tem permissão para acessar este conteúdo.</p>
<hr class="my-4">
<p>
<a class="btn btn-primary" href="/pagina_principal">Voltar para página principal</a>
<a class="btn btn-primary"
href="/pagina_principal"
th:text="#{go_back_home}">Voltar para página principal</a>
</p>
</div>
</div>
Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/templates/error.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="pt-br">
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html lang="pt-br" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand All @@ -18,11 +18,12 @@

<div class="container mt-5">
<div class="row">
<h1>Erro encontrado</h1>
<h1 th:text="#{error_generic_title}">Erro encontrado</h1>
</div>

<div class="row">
<a href="/pagina_principal">Voltar para a home</a>
<a href="/pagina_principal"
th:text="#{go_back_home}">Voltar para a home</a>
</div>
</div>

Expand Down
11 changes: 6 additions & 5 deletions src/main/resources/templates/formulario_atualizar_pet.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,31 @@

<div class="container mt-5">
<div class="row">
<h1>Editar Pet</h1>
<h1 th:text="#{pet_update_page_title}"></h1>
</div>

<div class="row">
<form th:action="@{/atualizar_pet/{idPet}(idPet = ${pet.id})}" method="post" th:object="${pet}">

<div class="form-group">
<label for="nome">Nome</label>
<label for="nome" th:text="#{pet_name_label}">Nome</label>
<input class="form-control" type="text" id="nome" th:field="*{nome}">
</div>

<div class="form-group">
<label for="raca">Raça</label>
<label for="raca" th:text="#{pet_race_label}">Raça</label>
<select class="form-select" id="raca" th:field="*{raca.nome}">
<option th:each="r : ${lista_racas}"
th:value="${r}"
th:text="${r}">
</select>
<small id="racaHelp" class="form-text text-muted">
<a href="/formulario_cadastrar_raca">Cadastrar nova raça</a>
<a href="/formulario_cadastrar_raca"
th:text="#{race_register}">Cadastrar nova raça</a>
</small>
</div>

<button class="btn btn-primary mt-4" type="submit">Submit</button>
<button class="btn btn-primary mt-4" type="submit" th:text="#{btn_send}">Submit</button>

</form>
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/main/resources/templates/formulario_cadastrar_pet.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,33 @@

<div class="container mt-5">
<div class="row">
<h1>Cadastro de Pet</h1>
<h1 th:text="#{pet_register_page_title}">Cadastro de Pet</h1>
</div>

<div class="row">
<form action="/cadastrar_pet" method="post" th:object="${pet}">

<div class="form-group">
<label for="nome">Nome</label>
<label for="nome" th:text="#{pet_name_label}">Nome</label>
<input class="form-control" type="text" id="nome" th:field="*{nome}">
</div>

<div class="form-group">
<label for="raca">Raça</label>
<label for="raca" th:text="#{pet_race_label}">Raça</label>
<select class="form-select" id="raca" th:field="*{raca.nome}">
<option th:each="r : ${lista_racas}"
th:value="${r}"
th:text="${r}">
</select>
<small id="racaHelp" class="form-text text-muted">
<a href="/formulario_cadastrar_raca">Cadastrar nova raça</a>
<a href="/formulario_cadastrar_raca"
th:text="#{race_register}">Cadastrar nova raça</a>
</small>
</div>

<input type="hidden" name="_csrf" th:value="${_csrf.token}">

<button class="btn btn-primary mt-4" type="submit">Submit</button>
<button class="btn btn-primary mt-4" type="submit" th:text="#{btn_send}">Submit</button>

</form>
</div>
Expand Down
Loading

0 comments on commit 66b1048

Please sign in to comment.