diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 4ca081e..d8c68ba 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -745,7 +745,7 @@ function comment_preprocess_field(&$variables) { // Append additional attributes (eg. RDFa) from the first field item. $variables['attributes'] += $variables['items'][0]['attributes']->storage(); - // Get comment form title. + // Get comment form heading. $variables['form_heading'] = $element[0]['#comment_form_heading']; // Create separate variables for the comments and comment form. diff --git a/core/modules/comment/src/CommentTypeForm.php b/core/modules/comment/src/CommentTypeForm.php index 1b4470f..fe9a504 100644 --- a/core/modules/comment/src/CommentTypeForm.php +++ b/core/modules/comment/src/CommentTypeForm.php @@ -99,7 +99,7 @@ public function form(array $form, FormStateInterface $form_state) { '#type' => 'textfield', '#title' => t('Form heading'), '#maxlength' => 255, - '#default_value' => $this->t($comment_type->getFormHeading()), + '#default_value' => $comment_type->getFormHeading(), ); if ($comment_type->isNew()) { diff --git a/core/modules/comment/templates/field--comment.html.twig b/core/modules/comment/templates/field--comment.html.twig index 6610b3b..a3b168e 100644 --- a/core/modules/comment/templates/field--comment.html.twig +++ b/core/modules/comment/templates/field--comment.html.twig @@ -14,7 +14,8 @@ * be displayed after the main title tag that appears in the template. * - comments: List of comments rendered through comment.html.twig. * - content_attributes: HTML attributes for the form title. - * - comment_form: The 'Add new comment' form. + * - comment_form: The form to add new comment. + * - form_heading: The heading for comment form. * - comment_display_mode: Is the comments are threaded. * - comment_type: The comment type bundle ID for the comment field. * - entity_type: The entity type to which the field belongs. diff --git a/core/themes/classy/templates/field/field--comment.html.twig b/core/themes/classy/templates/field/field--comment.html.twig index ed8981c..1211ec6 100644 --- a/core/themes/classy/templates/field/field--comment.html.twig +++ b/core/themes/classy/templates/field/field--comment.html.twig @@ -13,7 +13,8 @@ * - title_suffix: Additional title output populated by modules, intended to * be displayed after the main title tag that appears in the template. * - comments: List of comments rendered through comment.html.twig. - * - comment_form: The 'Add new comment' form. + * - comment_form: The form to add new comment. + * - form_heading: The heading for comment form. * - comment_display_mode: Is the comments are threaded. * - comment_type: The comment type bundle ID for the comment field. * - entity_type: The entity type to which the field belongs. diff --git a/core/themes/stable/templates/field/field--comment.html.twig b/core/themes/stable/templates/field/field--comment.html.twig index 33a60ae..128b1d8 100644 --- a/core/themes/stable/templates/field/field--comment.html.twig +++ b/core/themes/stable/templates/field/field--comment.html.twig @@ -14,7 +14,8 @@ * be displayed after the main title tag that appears in the template. * - comments: List of comments rendered through comment.html.twig. * - content_attributes: HTML attributes for the form title. - * - comment_form: The 'Add new comment' form. + * - comment_form: The form to add new comment. + * - form_heading: The heading for comment form. * - comment_display_mode: Is the comments are threaded. * - comment_type: The comment type bundle ID for the comment field. * - entity_type: The entity type to which the field belongs.