diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8e92715cf76..c2f4dbef1d9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5996,7 +5996,7 @@ abstract class CommonObject if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') { - $out .= $extrafields->showSeparator($key); + $out .= $extrafields->showSeparator($key, $this); } else { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 09b73ab03c3..89c867a3adc 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1743,11 +1743,16 @@ class ExtraFields * Return HTML string to print separator extrafield * * @param string $key Key of attribute - * @return string + * @param string $object Object + * @return string HTML code with line for separator */ - function showSeparator($key) + function showSeparator($key, $object) { - $out = ''.$this->attribute_label[$key].''; + global $langs; + + $out = ''; + $out.= $langs->trans($this->attributes[$object->table_element]['label'][$key]); + $out.= ''; return $out; } diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 25e0183fef9..3b75905370f 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -80,7 +80,7 @@ if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element][ } if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate') { - print $extrafields->showSeparator($key); + print $extrafields->showSeparator($key, $object); } else {