Fixed static_pages translations

This commit is contained in:
Noah Lancien 2023-10-20 10:45:11 +02:00
parent a807c9656c
commit e346e65d7d
4 changed files with 10 additions and 8 deletions

View file

@ -1,14 +1,14 @@
@extends('bo.layout', ['brParam' => $staticPageModel])
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.static_page')]))
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.static_page')]))
@section('title', __('Édition d\'une :model', ['model' => trans_choice('models.classes.static_page', 1)]))
@section('description', __('Édition d\'une :model déjà existante', ['model' => trans_choice('models.classes.static_page', 1)]))
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap pb-3">
<div class="d-flex align-items-start flex-row">
<a class="btn btn-primary text-decoration-none m-0" data-bs-toggle="tooltip" href="{{ route('bo.static_pages.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::plural(__('models.classes.static_page'))]) }}">
title="{{ __('crud.helpers.list_all', ['model' => trans_choice('models.classes.static_page', '*')]) }}">
<i class="fa-solid fa-arrow-left"></i>
</a>
@include('modules.breadcrumbs.breadcrumb-body', ['brParam' => $staticPageModel])
@ -16,7 +16,7 @@
<div class="mb-md-0 mb-2">
<div class="btn-group">
<button class="btn btn-primary" id="formSubmitClone" data-bs-toggle="tooltip" type="submit"
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.static_page')]) }}">
title="{{ __('crud.helpers.save_model', ['model' => trans_choice('models.classes.static_page', 1)]) }}">
{{ Str::ucfirst(__('crud.actions.save')) }}
</button>
</div>
@ -29,7 +29,7 @@
<div class="row">
<div class="col text-center">
<button class="btn btn-primary" id="formSubmit" data-bs-toggle="tooltip" type="submit"
title="{{ __('crud.helpers.save_model', ['model' => __('models.classes.static_page')]) }}">
title="{{ __('crud.helpers.save_model', ['model' => trans_choice('models.classes.static_page', 1)]) }}">
{{ Str::ucfirst(__('crud.actions.save')) }}
</button>
</div>

View file

@ -125,6 +125,7 @@
</div>
</div>
@if (\in_array($staticPageModel->type, [\App\Enums\StaticPageType::confidentiality, \App\Enums\StaticPageType::legals]))
<div class="row">
{{-- CONTENT --}}
<div class="col-12 mb-3">
@ -149,6 +150,7 @@
</fieldset>
</div>
</div>
@endif
<div class="row">
<div class="col text-center">

View file

@ -39,7 +39,7 @@
</tbody>
@else
<tr>
<td class="border-0">{{ __('crud.other.no_model_found', ['model' => __('models.classes.static_page')]) }}</td>
<td class="border-0">{{ __('crud.other.no_model_found', ['model' => trans_choice('models.classes.static_page', 1)]) }}</td>
</tr>
@endif
</table>

View file

@ -1,7 +1,7 @@
@extends('bo.layout')
@section('title', Str::ucfirst(__('models.classes.static_page')))
@section('description', __('Liste de tous les :model', ['model' => Str::plural(__('models.classes.static_page'))]))
@section('title', Str::ucfirst(trans_choice('models.classes.static_page', '*')))
@section('description', __('Liste de toutes les :model', ['model' => trans_choice('models.classes.static_page', '*')]))
@section('content')
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap">