From: Vincent Vanwaelscappel Date: Wed, 9 Dec 2020 12:45:54 +0000 (+0100) Subject: wip #3753 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f5b6987736b2d99316df8c6be63b3fe80ec6e674;p=cubedesigners_userdatabase.git wip #3753 @0.25 --- diff --git a/src/Address.php b/src/Address.php index a99a222..7e12142 100644 --- a/src/Address.php +++ b/src/Address.php @@ -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']); } } diff --git a/src/Company.php b/src/Company.php index b41c146..344e5aa 100644 --- a/src/Company.php +++ b/src/Company.php @@ -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)); diff --git a/src/User.php b/src/User.php index 52894af..a63bc2e 100644 --- a/src/User.php +++ b/src/User.php @@ -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'];