diff -u b/token.tokens.inc b/token.tokens.inc --- b/token.tokens.inc +++ b/token.tokens.inc @@ -128,7 +128,7 @@ // Node tokens. $info['tokens']['node']['source'] = array( 'name' => t('Translation source node'), - 'description' => t("The source node for this current node's entity translation."), + 'description' => t("The source node for this current node's translation set."), 'type' => 'node', ); $info['tokens']['node']['log'] = array( @@ -172,11 +172,11 @@ // Taxonomy term and vocabulary tokens. if (\Drupal::moduleHandler()->moduleExists('taxonomy')) { - $info['tokens']['term']['source'] = array( + $info['tokens']['term']['source'] = [ 'name' => t('Translation source term'), 'description' => t("The source term for this current term's translation set."), 'type' => 'term', - ); + ]; $info['tokens']['term']['edit-url'] = array( 'name' => t('Edit URL'), 'description' => t("The URL of the taxonomy term's edit page."), @@ -193,11 +193,11 @@ 'type' => 'term', ); - $info['tokens']['vocabulary']['source'] = array( + $info['tokens']['vocabulary']['source'] = [ 'name' => t('Translation source vocabulary'), 'description' => t("The source vocabulary for this current vocabulary's translation set."), 'type' => 'vocabulary', - ); + ]; $info['tokens']['vocabulary']['machine-name'] = array( 'name' => t('Machine-readable name'), 'description' => t('The unique machine-readable name of the vocabulary.'), @@ -572,9 +572,9 @@ // Chained token relationships. if (($parent_tokens = \Drupal::token()->findWithPrefix($tokens, 'source')) && $source_term = \Drupal::service('entity.repository')->getTranslationFromContext($term, LanguageInterface::LANGCODE_DEFAULT)) { - $replacements += \Drupal::token()->generate('term', $parent_tokens, array( - 'term' => $source_term), $options, - $bubbleable_metadata); + $replacements += \Drupal::token()->generate('term', $parent_tokens, [ + 'term' => $source_term, + ], $options, $bubbleable_metadata); } if (($url_tokens = \Drupal::token()->findWithPrefix($tokens, 'url'))) { $replacements += \Drupal::token()->generate('url', $url_tokens, array('url' => $term->toUrl()), $options, $bubbleable_metadata);