How to change comment submit Drupal 8?

Since comment post is a form, the submit button text can be changed via form alter the in following way.

/**
 * Implements hook_form_alter().
 */
function your_module_form_alter(&$form,  FormStateInterface $form_state, $form_id){
if($form_id == 'comment_comment_form') {
  $form['actions']['submit']['#value'] = t('POST A COMMENT');
  }
}

Tags