ajout des traductions en et fr

This commit is contained in:
hugo.pradier2
2024-06-11 23:05:31 +02:00
committed by clfreville2
parent 352a0db047
commit 0215583fee
25 changed files with 1128 additions and 75 deletions

View File

@@ -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>

View File

@@ -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) }}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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>

View File

@@ -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 %}