ajout des traductions en et fr
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
<li class="page-item {{ page < 2 ? 'disabled' }}">
|
||||
<a class="page-link" href="{{ path(route, {'page': page - 1}) }}">Previous</a>
|
||||
<a class="page-link" href="{{ path(route, {'page': page - 1}) }}">{{ 'previous'|trans }}</a>
|
||||
</li>
|
||||
{% if page > 1 %}
|
||||
<li class="page-item">
|
||||
@@ -18,7 +18,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="page-item {{ page + 1 > maxPage ? 'disabled' }}">
|
||||
<a class="page-link" href="{{ path(route, {'page': page + 1}) }}">Next</a>
|
||||
<a class="page-link" href="{{ path(route, {'page': page + 1}) }}">{{ 'next'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Welcome to Herbarium!{% endblock %}</title>
|
||||
<title>{% block title %}{{ 'welcome_to_herbarium'|trans }}{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% block stylesheets %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
@@ -17,9 +17,9 @@
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{{ path('app_species_index') }}">Herbarium</a>
|
||||
{% if app.user %}
|
||||
<a class="nav-link" href="{{ path('app_logout') }}">{{ app.user.email }} - Log out</a>
|
||||
<a class="nav-link" href="{{ path('app_logout') }}">{{ app.user.email }} - {{ 'log_out'|trans }}</a>
|
||||
{% else %}
|
||||
<a class="nav-link" href="{{ path('app_login') }}">Sign in</a>
|
||||
<a class="nav-link" href="{{ path('app_login') }}">{{ 'sign_in'|trans }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<form method="post" action="{{ path('app_post_delete', {'id': post.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<form method="post" action="{{ path('app_post_delete', {'id': post.id}) }}" onsubmit="return confirm('{{ 'delete_confirm'|trans }}');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ post.id) }}">
|
||||
<button class="btn btn-danger">{{ 'delete'|trans }}</button>
|
||||
</form>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn btn-primary">{{ button_label|default('Save') }}</button>
|
||||
<button class="btn">{{ button_label|default('save'|trans) }}</button>
|
||||
{{ form_end(form) }}
|
||||
|
@@ -3,11 +3,11 @@
|
||||
{% block title %}Edit Post{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Post</h1>
|
||||
<h1>{{ 'edit_post'|trans }}</h1>
|
||||
|
||||
{{ include('post/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
{{ include('post/_form.html.twig', {'button_label': 'update'|trans}) }}
|
||||
|
||||
<a href="{{ path('app_post_index') }}">Back to list</a>
|
||||
<a href="{{ path('app_post_index') }}">{{ 'back_to_list'|trans }}</a>
|
||||
|
||||
{{ include('post/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
|
@@ -1,19 +1,19 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Posts{% endblock %}
|
||||
{% block title %}{{ 'posts'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for post in posts.iterator %}
|
||||
<div class="card mb-4">
|
||||
<div class="card" style="width: 42rem; margin: 20px 0 50px 100px;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><a href="{{ path('app_post_show', {id: post.id}) }}">{{ post.species ? post.species.vernacularName : 'Post' }}</a></h5>
|
||||
<h5 class="card-title">{{ post.species ? post.species.vernacularName : 'post_undefined'|trans }}</h5>
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ post.foundDate | date("d/m/Y \\à H \\h") }}</h6>
|
||||
<p class="card-subtitle mb-2 text-muted">{{ post.latitude }}, {{ post.longitude }}, {{ post.altitude }}m</p>
|
||||
<p class="card-text">{{ post.commentary }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
28 ❤️
|
||||
{{ post.comments.count() }} 💬
|
||||
128 💬
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Post{% endblock %}
|
||||
{% block title %}{{ 'new_post'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Post</h1>
|
||||
<h1>{{ 'create_new_post'|trans }}</h1>
|
||||
|
||||
{{ include('post/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_post_index') }}">Back to list</a>
|
||||
<a href="{{ path('app_post_index') }}">{{ 'back_to_list'|trans }}</a>
|
||||
{% endblock %}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Post{% endblock %}
|
||||
{% block title %}{{ 'post'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Post</h1>
|
||||
<h1>{{ 'post'|trans }}</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@@ -12,11 +12,11 @@
|
||||
<td>{{ post.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>FoundDate</th>
|
||||
<th>{{ 'found_date'|trans }}</th>
|
||||
<td>{{ post.foundDate ? post.foundDate|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>PublicationDate</th>
|
||||
<th>{{ 'publication_date'|trans }}</th>
|
||||
<td>{{ post.publicationDate ? post.publicationDate|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -38,15 +38,15 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>Commentary</th>
|
||||
<th>{{ 'commentary'|trans }}</th>
|
||||
<td>{{ post.commentary }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_post_index') }}">Back to list</a>
|
||||
<a href="{{ path('app_post_index') }}">{{ 'back_to_list'|trans }}</a>
|
||||
|
||||
<a href="{{ path('app_post_edit', {'id': post.id}) }}">Edit</a>
|
||||
<a href="{{ path('app_post_edit', {'id': post.id}) }}">{{ 'edit'|trans }}</a>
|
||||
|
||||
{{ include('post/_delete_form.html.twig') }}
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Post index{% endblock %}
|
||||
{% block title %}{{ 'post_index'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Post index</h1>
|
||||
<h1>{{ 'post_index'|trans }}</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>FoundDate</th>
|
||||
<th>PublicationDate</th>
|
||||
<th>{{ 'found_date'|trans }}</th>
|
||||
<th>{{ 'publication_date'|trans }}</th>
|
||||
<th>Latitude</th>
|
||||
<th>Longitude</th>
|
||||
<th>Altitude</th>
|
||||
<th>Commentary</th>
|
||||
<th>{{ 'commentary'|trans }}</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -29,17 +29,17 @@
|
||||
<td>{{ post.altitude }}</td>
|
||||
<td>{{ post.commentary }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_post_show', {'id': post.id}) }}">Show</a>
|
||||
<a href="{{ path('app_post_edit', {'id': post.id}) }}">Edit</a>
|
||||
<a href="{{ path('app_post_show', {'id': post.id}) }}">{{ 'show'|trans }}</a>
|
||||
<a href="{{ path('app_post_edit', {'id': post.id}) }}">{{ 'edit'|trans }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="8">no records found</td>
|
||||
<td colspan="8">{{ 'no_records_found'|trans }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_post_new') }}">Create new</a>
|
||||
<a href="{{ path('app_post_new') }}">{{ 'create_new'|trans }}</a>
|
||||
{% endblock %}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Register{% endblock %}
|
||||
{% block title %}{{ 'register'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Register</h1>
|
||||
<h1>{{ 'register'|trans }}</h1>
|
||||
|
||||
{{ form_errors(registrationForm) }}
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
}) }}
|
||||
{{ form_row(registrationForm.agreeTerms) }}
|
||||
|
||||
<button type="submit" class="btn btn-primary">Register</button>
|
||||
<button type="submit" class="btn btn-primary">{{ 'register'|trans }}</button>
|
||||
{{ form_end(registrationForm) }}
|
||||
{% endblock %}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Log in!{% endblock %}
|
||||
{% block title %}{{ 'log_in'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<form method="post">
|
||||
@@ -10,17 +10,17 @@
|
||||
|
||||
{% if app.user %}
|
||||
<div class="mb-3">
|
||||
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
|
||||
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">{{ 'logout'|trans }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
|
||||
<h1 class="h3 mb-3 font-weight-normal">{{ 'sign_in'|trans }}</h1>
|
||||
<div class="mb-3">
|
||||
<label for="username">Email</label>
|
||||
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" required autofocus>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password">Password</label>
|
||||
<label for="password">{{ 'password'|trans }}</label>
|
||||
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" required>
|
||||
</div>
|
||||
|
||||
@@ -34,16 +34,16 @@
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
<input type="checkbox" name="_remember_me">{{ 'remember_me'|trans }}
|
||||
</label>
|
||||
</div>
|
||||
#}
|
||||
|
||||
<button class="btn btn-primary" type="submit">
|
||||
Sign in
|
||||
{{ 'sign_in'|trans }}
|
||||
</button>
|
||||
<a class="btn btn-secondary" href="{{ path('app_register') }}">
|
||||
Sign up
|
||||
{{ 'sign_up'|trans }}
|
||||
</a>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<form method="post" action="{{ path('app_species_delete', {'id': species.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<form method="post" action="{{ path('app_species_delete', {'id': species.id}) }}" onsubmit="return confirm('{{ 'delete_item_confirmation'|trans }}');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ species.id) }}">
|
||||
<button class="btn btn-danger">Delete</button>
|
||||
<button class="btn btn-danger">{{ 'delete'|trans }}</button>
|
||||
</form>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
<button class="btn">{{ button_label|default('save'|trans) }}</button>
|
||||
{{ form_end(form) }}
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Species{% endblock %}
|
||||
{% block title %}{{ 'edit_species'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Species</h1>
|
||||
<h1>{{ 'edit_species'|trans }}</h1>
|
||||
|
||||
{{ include('species/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
{{ include('species/_form.html.twig', {'button_label': 'update'|trans}) }}
|
||||
|
||||
<a href="{{ path('app_species_index') }}">Back to list</a>
|
||||
<a href="{{ path('app_species_index') }}">{{ 'back_to_list'|trans }}</a>
|
||||
|
||||
{{ include('species/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Species{% endblock %}
|
||||
{% block title %}{{ 'species'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<style>
|
||||
@@ -9,7 +9,7 @@
|
||||
</style>
|
||||
|
||||
<div class="example-wrapper">
|
||||
<h1>Liste des espèces</h1>
|
||||
<h1>{{ 'list_of_species'|trans }}</h1>
|
||||
|
||||
<dl>
|
||||
{% for specie in species %}
|
||||
@@ -19,12 +19,12 @@
|
||||
</a>
|
||||
</dt>
|
||||
<dd >
|
||||
🔬 Scientific name : {{ specie.scientificName }}<br/>
|
||||
📍 Region : {{ specie.region }}
|
||||
🔬 {{ 'scientific_name'|trans }} : {{ specie.scientificName }}<br/>
|
||||
📍 {{ 'region'|trans }} : {{ specie.region }}
|
||||
</dd><br/>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
|
||||
<a href="{{ path('app_species_new') }}">Create new</a>
|
||||
<a href="{{ path('app_species_new') }}">{{ 'create_new'|trans }}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -3,9 +3,9 @@
|
||||
{% block title %}New Species{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Species</h1>
|
||||
<h1>{{ 'create_new_species'|trans }}</h1>
|
||||
|
||||
{{ include('species/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_species_index') }}">Back to list</a>
|
||||
<a href="{{ path('app_species_index') }}">{{ 'back_to_list'|trans }}</a>
|
||||
{% endblock %}
|
||||
|
@@ -1,16 +1,16 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Species{% endblock %}
|
||||
{% block title %}{{ 'species'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ species.vernacularName }}</h1>
|
||||
<p>
|
||||
🔬 Scientific name : {{ species.scientificName }}<br/>
|
||||
📍 Region : {{ species.region }}
|
||||
🔬 {{ 'scientific_name'|trans }} : {{ species.scientificName }}<br/>
|
||||
📍 {{ 'region'|trans }} : {{ species.region }}
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<h2>Posts :</h2>
|
||||
<h2>{{ 'posts'|trans }} :</h2>
|
||||
|
||||
{% for post in species.posts %}
|
||||
<div>
|
||||
@@ -18,18 +18,18 @@
|
||||
<h3>{{ post.publicationDate | date }}</h3>
|
||||
</dt>
|
||||
<dl>
|
||||
<dt>📍Geolocation</dt>
|
||||
<dt>📍{{ 'geolocation'|trans }}</dt>
|
||||
<dd>{{ post.longitude }} - {{ post.latitude }}</dd>
|
||||
|
||||
<dt>💬Commentary</dt>
|
||||
<dt>💬{{ 'commentary'|trans }}</dt>
|
||||
<dd>{{ post.getCommentary }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<a href="{{ path('app_species_index') }}">Back to list</a>
|
||||
<a href="{{ path('app_species_index') }}">{{ 'back_to_list'|trans }}</a>
|
||||
|
||||
<a href="{{ path('app_species_edit', {'id': species.id}) }}">Edit</a>
|
||||
<a href="{{ path('app_species_edit', {'id': species.id}) }}">{{ 'edit'|trans }}</a>
|
||||
|
||||
{{ include('species/_delete_form.html.twig') }}
|
||||
</div>
|
||||
|
@@ -1,18 +1,18 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Species index{% endblock %}
|
||||
{% block title %}{{ 'species_index'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Species index</h1>
|
||||
<h1>{{ 'species_index'|trans }}</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Scientific_name</th>
|
||||
<th>Vernacular_name</th>
|
||||
<th>{{ 'scientific_name'|trans }}</th>
|
||||
<th>{{ 'vernacular_name'|trans }}</th>
|
||||
<th>Region</th>
|
||||
<th>actions</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -23,17 +23,17 @@
|
||||
<td>{{ species.vernacularName }}</td>
|
||||
<td>{{ species.region }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_species_show', {'id': species.id}) }}">Show</a>
|
||||
<a href="{{ path('app_species_edit', {'id': species.id}) }}">Edit</a>
|
||||
<a href="{{ path('app_species_show', {'id': species.id}) }}">{{ 'show'|trans }}</a>
|
||||
<a href="{{ path('app_species_edit', {'id': species.id}) }}">{{ 'edit'|trans }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5">no records found</td>
|
||||
<td colspan="5">{{ 'no_records_found'|trans }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_species_new') }}">Create new</a>
|
||||
<a href="{{ path('app_species_new') }}">{{ 'create_new'|trans }}</a>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user