From 8ae25c2e41564a4f4d7f36ff4fad97ad9a8bbd19 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 25 Sep 2019 19:28:12 +0200 Subject: [PATCH] wip #3080 2 --- app/Http/Kernel.php | 1 + app/Models/Product.php | 2 +- app/Models/Producttype.php | 2 +- app/Models/Settings.php | 18 +++++++++--------- app/SubForms/Person.php | 6 +++--- app/SubForms/SocialNetworks.php | 4 ++-- app/SubForms/Strength.php | 6 +++--- app/SubForms/Value.php | 6 +++--- app/Templates/Base.php | 2 +- app/Templates/Catalog.php | 2 +- app/Templates/Home.php | 4 ++-- config/cubist.php | 1 + .../views/partials/contact-shortcut.blade.php | 2 +- 13 files changed, 29 insertions(+), 27 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index cd9feaf..6acd4a7 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -15,6 +15,7 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ + \Cubist\Backpack\app\Middleware\LocaleSelector::class, \App\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, diff --git a/app/Models/Product.php b/app/Models/Product.php index c7043c1..28a43b5 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -476,7 +476,7 @@ class Product extends CubistMagicPageModel } } if (isset($values['-'])) { - $options['-'] = ['label' => __('Non défini'), 'value' => '-', 'nb_products' => $values['-']]; + $options['-'] = ['label' => 'Non défini', 'value' => '-', 'nb_products' => $values['-']]; } $f['options'] = $options; } else if ($data->type == 'numeric' || $data->type == 'range' || $data->type == 'numeric_list') { diff --git a/app/Models/Producttype.php b/app/Models/Producttype.php index 15c3c83..5c2516e 100644 --- a/app/Models/Producttype.php +++ b/app/Models/Producttype.php @@ -79,7 +79,7 @@ class ProductType extends CubistMagicPageModel 'name' => 'intro', 'type' => 'BunchOfFields', 'bunch' => 'App\SubForms\Intro', - 'label' => __('Introduction'), + 'label' => 'Introduction', 'tab' => 'Introduction', ]); diff --git a/app/Models/Settings.php b/app/Models/Settings.php index 465177c..ea3cf12 100644 --- a/app/Models/Settings.php +++ b/app/Models/Settings.php @@ -12,18 +12,18 @@ class Settings extends \Cubist\Backpack\app\Magic\Models\Settings $this->addField(['name' => 'email', 'type' => 'Email', - 'label' => __('E-mail'), + 'label' => 'E-mail', 'tab' => 'Informations de contact']); $this->addField(['name' => 'phone', 'type' => 'Text', - 'label' => __('Téléphone'), + 'label' => 'Téléphone', 'translatable' => false, 'tab' => 'Informations de contact']); $this->addField(['name' => 'address', 'type' => 'Textarea', - 'label' => __('Adresse'), + 'label' => 'Adresse', 'translatable' => false, 'tab' => 'Informations de contact']); @@ -32,8 +32,8 @@ class Settings extends \Cubist\Backpack\app\Magic\Models\Settings 'name' => 'social', 'type' => 'BunchOfFields', 'bunch' => 'App\SubForms\SocialNetworks', - 'label' => __('Réseaux Sociaux'), - 'tab' => __('Réseaux Sociaux'), + 'label' => 'Réseaux Sociaux', + 'tab' => 'Réseaux Sociaux', ]); //=== Forms @@ -48,7 +48,7 @@ class Settings extends \Cubist\Backpack\app\Magic\Models\Settings $this->addField([ 'name' => 'footer_text', 'type' => 'Textarea', - 'label' => __('Texte de footer'), + 'label' => 'Texte de footer', 'attributes' => [ 'rows' => 4, ], @@ -58,14 +58,14 @@ class Settings extends \Cubist\Backpack\app\Magic\Models\Settings $this->addField([ 'name' => 'footer_heading_contact', 'type' => 'Text', - 'label' => __('Titre de colonne « Nous contacter »'), + 'label' => 'Titre de colonne « Nous contacter »', 'tab' => 'Footer', ]); $this->addField([ 'name' => 'footer_heading_strengths', 'type' => 'Text', - 'label' => __('Titre de colonne « PMI à votre service »'), + 'label' => 'Titre de colonne « PMI à votre service »', 'tab' => 'Footer' ]); @@ -74,7 +74,7 @@ class Settings extends \Cubist\Backpack\app\Magic\Models\Settings 'name' => 'strengths', 'type' => 'BunchOfFieldsMultiple', 'bunch' => 'App\SubForms\Strength', - 'label' => __('Points Forts'), + 'label' => 'Points Forts', 'tab' => 'Footer', ]); } diff --git a/app/SubForms/Person.php b/app/SubForms/Person.php index 22f5ad5..e85d20e 100644 --- a/app/SubForms/Person.php +++ b/app/SubForms/Person.php @@ -10,15 +10,15 @@ class Person extends SubForm { parent::init(); $this->addField(['name' => 'name', - 'label' => __('Nom'), + 'label' => 'Nom', 'type' => 'Text']); $this->addField(['name' => 'role', - 'label' => __('Role'), + 'label' => 'Role', 'type' => 'Text']); $this->addField(['name' => 'photo', - 'label' => __('Photo'), + 'label' => 'Photo', 'type' => 'Images', 'maxFiles' => 1]); } diff --git a/app/SubForms/SocialNetworks.php b/app/SubForms/SocialNetworks.php index 723fc62..72919e2 100644 --- a/app/SubForms/SocialNetworks.php +++ b/app/SubForms/SocialNetworks.php @@ -14,12 +14,12 @@ class SocialNetworks extends SubForm $this->addField(['name' => 'twitter', 'type' => 'Text', - 'label' => __('Twitter'), + 'label' => 'Twitter', 'translatable' => false]); $this->addField(['name' => 'linkedin', 'type' => 'Text', - 'label' => __('LinkedIn'), + 'label' => 'LinkedIn', 'translatable' => false]); } } diff --git a/app/SubForms/Strength.php b/app/SubForms/Strength.php index 4033f9b..59ba50e 100644 --- a/app/SubForms/Strength.php +++ b/app/SubForms/Strength.php @@ -12,19 +12,19 @@ class Strength extends SubForm parent::init(); $this->addField([ 'name' => 'title', - 'label' => __('Titre'), + 'label' => 'Titre', 'type' => 'Text', ]); $this->addField([ 'name' => 'description', - 'label' => __('Description'), + 'label' => 'Description', 'type' => 'Text', ]); $this->addField([ 'name' => 'icon', - 'label' => __('Picto'), + 'label' => 'Picto', 'type' => 'Images', 'translatable' => false, ]); diff --git a/app/SubForms/Value.php b/app/SubForms/Value.php index 4508bb7..78cdf4e 100644 --- a/app/SubForms/Value.php +++ b/app/SubForms/Value.php @@ -10,15 +10,15 @@ class Value extends SubForm { parent::init(); $this->addField(['name' => 'title', - 'label' => __('Titre de valeur'), + 'label' => 'Titre de valeur', 'type' => 'Text']); $this->addField(['name' => 'text', - 'label' => __('Texte de valeur'), + 'label' => 'Texte de valeur', 'type' => 'Textarea']); $this->addField(['name' => 'image', - 'label' => __('Image de valeur'), + 'label' => 'Image de valeur', 'type' => 'Images', 'maxFiles' => 1]); } diff --git a/app/Templates/Base.php b/app/Templates/Base.php index bf41d59..e46c637 100644 --- a/app/Templates/Base.php +++ b/app/Templates/Base.php @@ -14,7 +14,7 @@ class Base extends TemplatePage 'name' => 'intro', 'type' => 'BunchOfFields', 'bunch' => 'App\SubForms\Intro', - 'label' => __('Introduction'), + 'label' => 'Introduction', 'tab' => 'Intro', ]); } diff --git a/app/Templates/Catalog.php b/app/Templates/Catalog.php index 044e237..5fab9fc 100644 --- a/app/Templates/Catalog.php +++ b/app/Templates/Catalog.php @@ -24,7 +24,7 @@ class Catalog extends TemplateAbstract Debugbar::startMeasure('nav_catalog', 'Make Products sub navigation'); parent::setMenuChildren($menu); - $families = ['captor' => __('Capteurs'), 'system' => __('Systèmes de mesure')]; + $families = ['captor' =>'Capteurs', 'system' => 'Systèmes de mesure']; Debugbar::startMeasure('nav_catalog_models', 'Request catalog models'); Debugbar::startMeasure('nav_catalog_models_types', 'Request catalog models (types)'); diff --git a/app/Templates/Home.php b/app/Templates/Home.php index 2cf45a8..31390b0 100644 --- a/app/Templates/Home.php +++ b/app/Templates/Home.php @@ -25,7 +25,7 @@ class Home extends Base 'name' => 'slideshow', 'type' => 'BunchOfFieldsMultiple', 'bunch' => 'App\SubForms\Slide', - 'label' => __('Slideshow'), + 'label' => 'Slideshow', 'tab' => 'Slideshow', ]); @@ -33,7 +33,7 @@ class Home extends Base 'name' => 'services_support', 'type' => 'BunchOfFields', 'bunch' => 'App\SubForms\Intro', - 'label' => __('Bloc « Services & Support »'), + 'label' => 'Bloc « Services & Support »', 'tab' => 'Services & Support', ]); diff --git a/config/cubist.php b/config/cubist.php index 89c9dd9..30b613b 100644 --- a/config/cubist.php +++ b/config/cubist.php @@ -4,6 +4,7 @@ return [ 'internal_search_index' => env('CUBIST_INTERNAL_SEARCH_INDEX', strtolower(env('APP_NAME', 'App_name') . '_' . env('APP_ENV', 'dev'))), 'page_model' => '\App\Models\Page', 'settings_model' => '\App\Models\Settings', + 'locale_model' => '\App\Models\Locale', 'seo_robots' => env('SEO_ROBOTS', true), ]; diff --git a/resources/views/partials/contact-shortcut.blade.php b/resources/views/partials/contact-shortcut.blade.php index 38550b7..ee74803 100644 --- a/resources/views/partials/contact-shortcut.blade.php +++ b/resources/views/partials/contact-shortcut.blade.php @@ -9,7 +9,7 @@
{{ __('Contact') }} - {!! __('Formulaire de contact') !!} + {!! __('Formulaire de contact') !!} {{--
-- 2.39.5