Commit 3d49e1c4 authored by Harsh Panchal's avatar Harsh Panchal Committed by Deepak Bhati
Browse files

Issue #3292414 by Harsh panchal, heni_deepak: Only string literals should be...

Issue #3292414 by Harsh panchal, heni_deepak: Only string literals should be passed to t() where possible
parent 45a8557e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ function node_title_form_node_form_alter(&$form, FormStateInterface &$form_state
  $form['node_title_group'] = [
    '#type' => 'details',
    '#title' => t('Node Title'),
    '#description' => t(''),
    '#description' => t('Modify the title with specific requirements.'),
    '#group' => 'advanced',
    '#open' => FALSE,
    '#access' => TRUE,
@@ -50,7 +50,7 @@ function node_title_entity_base_field_info(EntityTypeInterface $entity_type) {
function node_title_preprocess_page_title(array &$variables) {
  if ($node = \Drupal::routeMatch()->getParameter('node')) {
    if (!empty($node->node_title->value)) {
      $variables['title'] = t($node->node_title->value);
      $variables['title'] = ($node->node_title->value);
    }
  }
}
@@ -63,7 +63,7 @@ function node_title_views_pre_render(&$view) {
  foreach ($result as $i => $row) {
    if (!empty(trim($view->result[$i]->_entity->node_title->value))) {
      $node_title = $view->result[$i]->_entity->node_title->value;
      $view->result[$i]->_entity->set('title', t($node_title));
      $view->result[$i]->_entity->set('title', ($node_title));
    }
  }
}