Add localized labels to groups selection when starting a new conversation

This commit is contained in:
Antoine Le Gonidec 2024-07-27 18:27:10 +02:00
parent 981eb2b31b
commit e7170ea044
Signed by: vv221
GPG key ID: 636B78F91CEB80D8
4 changed files with 32 additions and 2 deletions

View file

@ -31,6 +31,7 @@ class MMFCustomersGroupsServiceProvider extends ServiceProvider {
public function boot() { public function boot() {
$this->registerConfig(); $this->registerConfig();
$this->registerViews(); $this->registerViews();
$this->registerTranslations();
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->hooks(); $this->hooks();
} }
@ -77,6 +78,15 @@ class MMFCustomersGroupsServiceProvider extends ServiceProvider {
}, \Config::get('view.paths')), [$sourcePath]), 'mmfcustomersgroups'); }, \Config::get('view.paths')), [$sourcePath]), 'mmfcustomersgroups');
} }
/**
* Register translations.
*
* @return void
*/
public function registerTranslations() {
$this->loadTranslationsFrom(__DIR__ .'/../Resources/lang', 'mmfcustomersgroups');
}
/** /**
* Module hooks. * Module hooks.
*/ */

View file

@ -0,0 +1,10 @@
<?php
/*
SPDX-License-Identifier: AGPL-3.0-only
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/
return [
'add-as-cc' => 'Add in Cc: field',
'add-as-bcc' => 'Add in Bcc: field',
];

View file

@ -0,0 +1,10 @@
<?php
/*
SPDX-License-Identifier: AGPL-3.0-only
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/
return [
'add-as-cc' => 'Ajouter en copie (visible)',
'add-as-bcc' => 'Ajouter en copie (cachée)',
];

View file

@ -9,7 +9,7 @@
<!-- List of Customers Groups that should be included in this Conversation as Cc: --> <!-- List of Customers Groups that should be included in this Conversation as Cc: -->
<div class="form-group{{ $errors->has('groups_cc') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('groups_cc') ? ' has-error' : '' }}">
<label for="groups_cc" class="col-sm-2 control-label">{{ __('Groups selection - Cc:') }}</label> <label for="groups_cc" class="col-sm-2 control-label">{{ __('mmfcustomersgroups::customers-groups.add-as-cc') }}</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div class="multi-container"> <div class="multi-container">
@foreach ( $groups as $group ) @foreach ( $groups as $group )
@ -36,7 +36,7 @@
</div> </div>
<!-- List of Customers Groups that should be included in this Conversation as Bcc: --> <!-- List of Customers Groups that should be included in this Conversation as Bcc: -->
<div class="form-group{{ $errors->has('groups_bcc') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('groups_bcc') ? ' has-error' : '' }}">
<label for="groups_bcc" class="col-sm-2 control-label">{{ __('Groups selection - Bcc:') }}</label> <label for="groups_bcc" class="col-sm-2 control-label">{{ __('mmfcustomersgroups::customers-groups.add-as-bcc') }}</label>
<div class="col-sm-9"> <div class="col-sm-9">
<div class="multi-container"> <div class="multi-container">
@foreach ( $groups as $group ) @foreach ( $groups as $group )