ajout des traductions en et fr
This commit is contained in:
@@ -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 %}
|
||||
|
Reference in New Issue
Block a user