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()
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()