]> _ Git - cubist_cms-back.git/commitdiff
fix #3475 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Mar 2020 15:08:40 +0000 (16:08 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Mar 2020 15:08:40 +0000 (16:08 +0100)
src/app/Magic/Fields/BunchOfFieldsMultiple.php

index dc4089313b4069acfb7311cae49657c67a5b3f31..181bfbd48dff97c048db7a07e61b0c773de5954a 100644 (file)
@@ -15,7 +15,7 @@ class BunchOfFieldsMultiple extends BunchOfFields
 
     public function getDefaultAttributes()
     {
-        return array_merge(parent::getDefaultAttributes(), ['bunch' => [], "add_label" => 'Ajouter un élément']);
+        return array_merge(parent::getDefaultAttributes(), ['bunch' => [], "add_label" => __('Add an item')]);
     }
 
     public function _postSetAttributes()
@@ -23,13 +23,13 @@ class BunchOfFieldsMultiple extends BunchOfFields
         parent::_postSetAttributes();
         $this->_setBunchOfFields();
 
-        $first='';
+        $first = '';
         foreach ($this->_fields as $field) {
             $first = $field->getAttribute('name');
             break;
         }
 
-        $this->setAttributeIfNotSet('edit_label', 'Éditer « %' . $first . ' »');
+        $this->setAttributeIfNotSet('edit_label', sprintf(__('Edit « %%%s »'), $first));
     }
 
     protected function _setBunchOfFields()