Add localizations in Customers list view
This commit is contained in:
parent
6f0cc59162
commit
30552e58a5
4 changed files with 21 additions and 3 deletions
|
@ -24,7 +24,7 @@ class MMFRestrictedCustomersServiceProvider extends ServiceProvider {
|
||||||
public function boot() {
|
public function boot() {
|
||||||
$this->registerConfig();
|
$this->registerConfig();
|
||||||
$this->registerViews();
|
$this->registerViews();
|
||||||
$this->registerFactories();
|
$this->registerTranslations();
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||||
$this->commands([
|
$this->commands([
|
||||||
FetchEmails::class,
|
FetchEmails::class,
|
||||||
|
@ -116,7 +116,7 @@ class MMFRestrictedCustomersServiceProvider extends ServiceProvider {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function registerTranslations() {
|
public function registerTranslations() {
|
||||||
$this->loadJsonTranslationsFrom(__DIR__ .'/../Resources/lang');
|
$this->loadTranslationsFrom(__DIR__ .'/../Resources/lang', 'mmfrestrictedcustomers');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
9
Resources/lang/en/customers.php
Normal file
9
Resources/lang/en/customers.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
'no-mailbox' => 'Warning: no mailbox.',
|
||||||
|
];
|
9
Resources/lang/fr/customers.php
Normal file
9
Resources/lang/fr/customers.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
return [
|
||||||
|
'no-mailbox' => 'Attention: pas de boîte mail liée.',
|
||||||
|
];
|
|
@ -6,7 +6,7 @@
|
||||||
<a href="{{ Eventy::filter('customer.card.url', route('customers.update', ['id' => $customer->id]), $customer) }}" class="card hover-shade" @action('customer.card.link', $customer) >
|
<a href="{{ Eventy::filter('customer.card.url', route('customers.update', ['id' => $customer->id]), $customer) }}" class="card hover-shade" @action('customer.card.link', $customer) >
|
||||||
<img src="{{ $customer->getPhotoUrl() }}" />
|
<img src="{{ $customer->getPhotoUrl() }}" />
|
||||||
@if ($customer->mailbox_id == null)
|
@if ($customer->mailbox_id == null)
|
||||||
<p style="font-size:12px; color: red;">{{ __('Warning: no mailbox') }}</p>
|
<p style="font-size:12px; color: red;">{{ __('mmfrestrictedcustomers::customers.no-mailbox') }}</p>
|
||||||
@endif
|
@endif
|
||||||
<h4 title="{{ $customer->first_name }} {{ $customer->last_name }}">{{ $customer->first_name }} {{ $customer->last_name }}</h4>
|
<h4 title="{{ $customer->first_name }} {{ $customer->last_name }}">{{ $customer->first_name }} {{ $customer->last_name }}</h4>
|
||||||
<p class="text-truncate"><small>{{ $customer->getEmailOrPhone() }}</small></p>
|
<p class="text-truncate"><small>{{ $customer->getEmailOrPhone() }}</small></p>
|
||||||
|
|
Loading…
Reference in a new issue