diff --git a/config/schema/field_group.entity_display.schema.yml b/config/schema/field_group.entity_display.schema.yml index c47e784..f18f7ca 100644 --- a/config/schema/field_group.entity_display.schema.yml +++ b/config/schema/field_group.entity_display.schema.yml @@ -12,8 +12,9 @@ core.entity_view_display.*.*.*.third_party.field_group: - type: string label: 'The field name' label: - type: string + type: label label: Readable name of the group + translatable: true parent_name: type: string label: 'The parent group of this group' @@ -40,8 +41,9 @@ core.entity_form_display.*.*.*.third_party.field_group: - type: string label: 'The field name' label: - type: string + type: label label: Readable name of the group + translatable: true parent_name: type: string label: 'The parent group of this group' diff --git a/includes/field_ui.inc b/includes/field_ui.inc index 6a3cf76..5603a43 100644 --- a/includes/field_ui.inc +++ b/includes/field_ui.inc @@ -144,7 +144,7 @@ function field_group_field_ui_display_form_alter(&$form, FormStateInterface $for '#region_callback' => $params->region_callback, '#js_settings' => array('rowHandler' => 'group'), 'human_name' => array( - '#markup' => Html::escape(t($group->label)), + '#markup' => $group->label, '#prefix' => '', '#suffix' => '', ), diff --git a/src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php b/src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php index a92ee3c..9e334cd 100644 --- a/src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php +++ b/src/Plugin/field_group/FieldGroupFormatter/AccordionItem.php @@ -35,7 +35,7 @@ class AccordionItem extends FieldGroupFormatterBase { '#type' => 'field_group_accordion_item', '#open' => $this->getSetting('formatter') == 'open' ? TRUE : FALSE, '#description' => $this->getSetting('description'), - '#title' => Drupal::translation()->translate($this->getLabel()), + '#title' => $this->getLabel(), ); if ($this->getSetting('id')) { diff --git a/src/Plugin/field_group/FieldGroupFormatter/Details.php b/src/Plugin/field_group/FieldGroupFormatter/Details.php index 8a78c6e..2dc457a 100644 --- a/src/Plugin/field_group/FieldGroupFormatter/Details.php +++ b/src/Plugin/field_group/FieldGroupFormatter/Details.php @@ -28,7 +28,7 @@ class Details extends FieldGroupFormatterBase { $element += array( '#type' => 'details', - '#title' => Html::escape($this->t($this->getLabel())), + '#title' => $this->getLabel(), '#open' => $this->getSetting('open') ); diff --git a/src/Plugin/field_group/FieldGroupFormatter/Fieldset.php b/src/Plugin/field_group/FieldGroupFormatter/Fieldset.php index ecbf217..f7db4ba 100644 --- a/src/Plugin/field_group/FieldGroupFormatter/Fieldset.php +++ b/src/Plugin/field_group/FieldGroupFormatter/Fieldset.php @@ -27,7 +27,7 @@ class Fieldset extends FieldGroupFormatterBase { $element += array( '#type' => 'fieldset', - '#title' => Html::escape($this->t($this->getLabel())), + '#title' => $this->getLabel(), '#pre_render' => array(), '#attributes' => array(), ); diff --git a/src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php b/src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php index 41f2d7e..e002b10 100644 --- a/src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php +++ b/src/Plugin/field_group/FieldGroupFormatter/HtmlElement.php @@ -68,7 +68,7 @@ class HtmlElement extends FieldGroupFormatterBase { $element['#attributes'] = $element_attributes; if ($this->getSetting('show_label')) { $element['#title_element'] = $this->getSetting('label_element'); - $element['#title'] = Html::escape($this->t($this->getLabel())); + $element['#title'] = $this->getLabel(); } $form_state = new FormState(); diff --git a/src/Plugin/field_group/FieldGroupFormatter/Tab.php b/src/Plugin/field_group/FieldGroupFormatter/Tab.php index 7cc8a64..155ac37 100644 --- a/src/Plugin/field_group/FieldGroupFormatter/Tab.php +++ b/src/Plugin/field_group/FieldGroupFormatter/Tab.php @@ -32,7 +32,7 @@ class Tab extends FieldGroupFormatterBase { $add = array( '#type' => 'details', - '#title' => Html::escape($this->t($this->getLabel())), + '#title' => $this->getLabel(), '#description' => $this->getSetting('description'), );