]> _ Git - cubedesigners_userdatabase.git/commitdiff
wip #3753 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 9 Dec 2020 12:45:54 +0000 (13:45 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 9 Dec 2020 12:45:54 +0000 (13:45 +0100)
src/Address.php
src/Company.php
src/User.php

index a99a222f25c30a635b6223d85a2895da66cd94da..7e121424e5227aa25262f0660bd231f61b6fc9e7 100644 (file)
@@ -11,19 +11,19 @@ class Address extends SubForm
     {
         parent::init();
         $this->addField(['name' => 'address',
-            'label' => 'Address',
+            'label' => __('Adresse'),
             'type' => 'Textarea']);
 
         $this->addField(['name' => 'postcode',
-            'label' => 'Postcode',
+            'label' => __('Code postal'),
             'type' => 'Postcode']);
 
         $this->addField(['name' => 'city',
-            'label' => 'City',
+            'label' => __('Ville'),
             'type' => 'Text']);
 
         $this->addField(['name' => 'country',
-            'label' => 'Country',
+            'label' => __('Pays'),
             'type' => 'Country']);
     }
 }
index b41c14684884ba3bd788f2f6c26a8fa7eaeab8a7..344e5aa41699fe04b889dba928c05caab6428f95 100644 (file)
@@ -10,49 +10,49 @@ class Company extends CubistMagicAbstractModel
     protected $connection = 'extranet_users';
     protected $table = 'company';
     protected $_options = ['name' => 'company',
-        'singular' => 'company',
-        'plural' => 'companies'];
+        'singular' => 'entreprise',
+        'plural' => 'entreprises'];
 
     public function setFields()
     {
         parent::setFields();
 
         $this->addField(['name' => 'name',
-            'label' => 'Company name',
+            'label' => __('Nom de l\'entreprise'),
             'type' => 'Text',
             'column' => true,
-            'tab' => 'Details']);
+            'tab' => __('Informations')]);
 
         $this->addField(['name' => 'address',
             'type' => 'BunchOfFields',
             'bunch' => Address::class,
-            'label' => 'Address',
-            'tab' => 'Addresses']);
+            'label' => __('Adresse'),
+            'tab' => __('Adresses')]);
 
         $this->addField(['name' => 'billing_address',
             'type' => 'BunchOfFields',
             'bunch' => Address::class,
-            'label' => 'Billing address',
-            'tab' => 'Addresses']);
+            'label' => __('Adresse de facturation'),
+            'tab' => __('Adresses')]);
 
         $this->addField(['name' => 'vat_number',
             'type' => 'VATNumber',
-            'label' => 'VAT number',
-            'tab' => 'Details']);
+            'label' => __('Numéro de TVA'),
+            'tab' => __('Informations')]);
 
         $this->addField(['name' => 'type',
                 'type' => 'SelectFromArray',
-                'label' => 'Type',
+                'label' => __('Type'),
                 'options' => [
-                    0 => 'Undefined',
-                    1 => 'Very small company',
-                    2 => 'Startup',
-                    3 => 'Small / medium company',
-                    4 => 'Agency',
-                    5 => 'Big company',
-                    6 => 'Government / Public institution'
+                    0 => __('Non défini'),
+                    1 => __('TPE'),
+                    2 => __('Startup'),
+                    3 => __('PME'),
+                    4 => __('Agence'),
+                    5 => __('Grande entreprise'),
+                    6 => __('Gouvernement / Institution publique')
                 ],
-                'tab' => 'Details'
+                'tab' => __('Informations')
             ]
         );
 
@@ -60,13 +60,13 @@ class Company extends CubistMagicAbstractModel
             'type' => 'SelectFromModel',
             'optionsmodel' => User::class,
             'attribute' => 'nameWithCompany',
-            'label' => 'Administrator',
-            'tab' => 'Details']);
+            'label' => __('Administrateur'),
+            'tab' => __('Informations')]);
 
         $this->addField(['name' => 'website',
             'type' => 'URL',
-            'label' => 'Website',
-            'tab' => 'Details']);
+            'label' => __('Site web'),
+            'tab' => __('Informations')]);
 
         $this->addField(['name' => 'e1_ws_signatures',
             'type' => 'Hidden']);
@@ -91,7 +91,7 @@ class Company extends CubistMagicAbstractModel
             $builder->where('id', '<', '0');
             return;
         }
-        if ($bu->hasPermissionTo('company:admin')){
+        if ($bu->hasPermissionTo('company:admin')) {
             return;
         }
         $builder->whereIn('id', Permissions::getManagedCompanies($bu->id));
index 52894af07e4645f46a7e2979187a793abe220358..a63bc2eebd5aaccdd764f217b05b4fe62992ba63 100644 (file)
@@ -10,8 +10,8 @@ class User extends CubistMagicAuthenticatable
     protected $connection = 'extranet_users';
     protected $table = 'user';
     protected $_options = ['name' => 'users',
-        'singular' => 'user',
-        'plural' => 'users'];
+        'singular' => 'utilisateur',
+        'plural' => 'utilisateurs'];
 
     protected $_operations = ['\Cubedesigners\UserDatabase\Operations\LoginasOperation'];
 
@@ -22,45 +22,45 @@ class User extends CubistMagicAuthenticatable
         parent::setFields();
 
         $this->addField(['name' => 'firstname',
-            'label' => 'Firstname',
+            'label' => __('Prénom'),
             'type' => 'Text',
             'column' => true,
-            'tab' => 'Contact']);
+            'tab' => __('Contact')]);
 
         $this->addField(['name' => 'lastname',
-            'label' => 'Lastname',
+            'label' => __('Nom'),
             'type' => 'Text',
             'column' => true,
-            'tab' => 'Contact']);
+            'tab' => __('Contact')]);
 
         $this->addField(['name' => 'company',
-            'label' => 'Company',
+            'label' => __('Entreprise'),
             'type' => 'SelectFromModel',
             'optionsmodel' => Company::class,
-            'tab' => 'Contact',
+            'tab' => __('Contact'),
             'column' => true,
         ]);
 
         $this->addField(['name' => 'address',
             'type' => 'BunchOfFields',
             'bunch' => Address::class,
-            'label' => 'Address',
-            'tab' => 'Contact']);
+            'label' => __('Adresse'),
+            'tab' => __('Contact')]);
 
         $this->addField(['name' => 'phone',
-            'label' => 'Phone',
+            'label' => __('Téléphone'),
             'type' => 'Phone',
-            'tab' => 'Contact']);
+            'tab' => __('Contact')]);
 
         $this->addField(['name' => 'mobile',
-            'label' => 'Mobile',
+            'label' => __('Mobile'),
             'type' => 'Phone',
-            'tab' => 'Contact']);
+            'tab' => __('Contact')]);
 
         $this->addField(['name' => 'locale',
-            'label' => 'Locale',
+            'label' => __('Langue'),
             'type' => 'Locale',
-            'tab' => 'Settings']);
+            'tab' => __('Paramètres')]);
 
         $extranetv1 = ['settings', 'ws_password', 'ws_settings', 'ws_rights', 'ws_domains', 'ws_count', 'login', 'mobile', 'fax', 'notes', 'grade', 'resetpassword'];