diff --git a/core/modules/config_translation/config_translation.api.php b/core/modules/config_translation/config_translation.api.php index f631655..c20294d 100644 --- a/core/modules/config_translation/config_translation.api.php +++ b/core/modules/config_translation/config_translation.api.php @@ -53,7 +53,7 @@ function hook_config_translation_info(&$info) { $info[$entity_type_id . '_fields'] = array( 'base_route_name' => 'entity.field_config.' . $entity_type_id . '_field_edit_form', 'entity_type' => 'field_config', - 'title' => t('!label field'), + 'title' => t('@label field'), 'class' => '\Drupal\config_translation\ConfigFieldMapper', 'base_entity_type' => $entity_type_id, 'weight' => 10, diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index 3c81f78..84881bd 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -19,15 +19,15 @@ function config_translation_help($route_name, RouteMatchInterface $route_match) case 'help.page.config_translation': $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Configuration Translation module allows you to translate configuration text; for example, the site name, vocabularies, menus, or date formats. Together with the modules Language, Content Translation, and Interface Translation, it allows you to build multilingual websites. For more information, see the online documentation for the Configuration Translation module.', array('!doc_url' => 'https://www.drupal.org/documentation/modules/config_translation', '!config' => \Drupal::url('help.page', array('name' => 'config')), '!language' => \Drupal::url('help.page', array('name' => 'language')), '!locale' => \Drupal::url('help.page', array('name' => 'locale')), '!content-translation' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? \Drupal::url('help.page', array('name' => 'content_translation')) : '#')) . '

'; + $output .= '

' . t('The Configuration Translation module allows you to translate configuration text; for example, the site name, vocabularies, menus, or date formats. Together with the modules Language, Content Translation, and Interface Translation, it allows you to build multilingual websites. For more information, see the online documentation for the Configuration Translation module.', array('@doc_url' => 'https://www.drupal.org/documentation/modules/config_translation', '@config' => \Drupal::url('help.page', array('name' => 'config')), '@language' => \Drupal::url('help.page', array('name' => 'language')), '@locale' => \Drupal::url('help.page', array('name' => 'locale')), '@content-translation' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? \Drupal::url('help.page', array('name' => 'content_translation')) : '#')) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling translation') . '
'; - $output .= '
' . t('In order to translate configuration, the website must have at least two languages.', array('!url' => \Drupal::url('entity.configurable_language.collection'))) . '
'; + $output .= '
' . t('In order to translate configuration, the website must have at least two languages.', array('@url' => \Drupal::url('entity.configurable_language.collection'))) . '
'; $output .= '
' . t('Translating configuration text') . '
'; - $output .= '
' . t('Users with the Translate user edited configuration permission can access the configuration translation overview, and manage translations for specific languages. The Configuration translation page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on Translate, you are provided with a list of all languages. You can add or edit a translation for a specific language. Users with specific configuration permissions can also edit the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', array('!translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; + $output .= '
' . t('Users with the Translate user edited configuration permission can access the configuration translation overview, and manage translations for specific languages. The Configuration translation page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on Translate, you are provided with a list of all languages. You can add or edit a translation for a specific language. Users with specific configuration permissions can also edit the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', array('@translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; $output .= '
' . t('Translating date formats') . '
'; - $output .= '
' . t('You can choose to translate date formats on the Configuration translation page. This allows you not only to translate the label text, but also to set a language-specific PHP date format.', array('!translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; + $output .= '
' . t('You can choose to translate date formats on the Configuration translation page. This allows you not only to translate the label text, but also to set a language-specific PHP date format.', array('@translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; $output .= '
'; return $output; @@ -115,7 +115,7 @@ function config_translation_config_translation_info(&$info) { $info[$entity_type_id . '_fields'] = array( 'base_route_name' => "entity.field_config.{$entity_type_id}_field_edit_form", 'entity_type' => 'field_config', - 'title' => '!label field', + 'title' => '@label field', 'class' => '\Drupal\config_translation\ConfigFieldMapper', 'base_entity_type' => $entity_type_id, 'weight' => 10, @@ -144,7 +144,7 @@ function config_translation_config_translation_info(&$info) { $info[$entity_type_id] = array( 'class' => '\Drupal\config_translation\ConfigEntityMapper', 'base_route_name' => $base_route_name, - 'title' => '!label !entity_type', + 'title' => '@label @entity_type', 'names' => array(), 'entity_type' => $entity_type_id, 'weight' => 10, diff --git a/core/modules/config_translation/src/ConfigEntityMapper.php b/core/modules/config_translation/src/ConfigEntityMapper.php index 4a6d275..d454bb8 100644 --- a/core/modules/config_translation/src/ConfigEntityMapper.php +++ b/core/modules/config_translation/src/ConfigEntityMapper.php @@ -158,7 +158,7 @@ public function getTitle() { // current page language. The title placeholder is later escaped for // display. $entity_type_info = $this->entityManager->getDefinition($this->entityType); - return $this->t($this->pluginDefinition['title'], array('!label' => $this->entity->label(), '!entity_type' => $entity_type_info->getLowercaseLabel())); + return $this->t($this->pluginDefinition['title'], array('@label' => $this->entity->label(), '@entity_type' => $entity_type_info->getLowercaseLabel())); } /** diff --git a/core/modules/config_translation/src/FormElement/FormElementBase.php b/core/modules/config_translation/src/FormElement/FormElementBase.php index 7db01e1..acb65c8 100644 --- a/core/modules/config_translation/src/FormElement/FormElementBase.php +++ b/core/modules/config_translation/src/FormElement/FormElementBase.php @@ -100,9 +100,9 @@ protected function getSourceElement(LanguageInterface $source_language, $source_ return array( '#type' => 'item', - '#title' => $this->t('!label (!source_language)', array( - '!label' => $this->t($this->definition->getLabel()), - '!source_language' => $source_language->getName(), + '#title' => $this->t('@label (@source_language)', array( + '@label' => $this->t($this->definition->getLabel()), + '@source_language' => $source_language->getName(), )), '#markup' => $value, ); @@ -162,9 +162,9 @@ protected function getSourceElement(LanguageInterface $source_language, $source_ protected function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) { // Add basic properties that apply to all form elements. return array( - '#title' => $this->t('!label (!source_language)', array( - '!label' => $this->t($this->definition['label']), - '!source_language' => $translation_language->getName(), + '#title' => $this->t('@label (@source_language)', array( + '@label' => $this->t($this->definition['label']), + '@source_language' => $translation_language->getName(), )), '#default_value' => $translation_config, '#attributes' => array('lang' => $translation_language->getId()), diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php index 0916dcd..0dd735a 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php @@ -115,7 +115,7 @@ public function testMapperListPage() { $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId()); $this->drupalGet($base_url . '/translate'); - $title = t('!label !entity_type', array('!label' => $test_entity->label(), '!entity_type' => $entity_type->getLowercaseLabel())); + $title = t('@label @entity_type', array('@label' => $test_entity->label(), '@entity_type' => $entity_type->getLowercaseLabel())); $title = t('Translations for %label', array('%label' => $title)); $this->assertRaw($title); $this->assertRaw('' . t('Language') . ''); diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php index f220d1a..ab83fd6 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -365,7 +365,7 @@ public function testContactConfigEntityTranslation() { // Test that delete links work and operations perform properly. foreach ($this->langcodes as $langcode) { - $replacements = array('%label' => t('!label !entity_type', array('!label' => $label, '!entity_type' => Unicode::strtolower(t('Contact form')))), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()); + $replacements = array('%label' => t('@label @entity_type', array('@label' => $label, '@entity_type' => Unicode::strtolower(t('Contact form')))), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()); $this->drupalGet("$translation_base_url/$langcode/delete"); $this->assertRaw(t('Are you sure you want to delete the @language translation of %label?', $replacements)); diff --git a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php index 8041931..efbe68d 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php @@ -70,7 +70,7 @@ protected function setUp() { $definition = array( 'class' => '\Drupal\config_translation\ConfigEntityMapper', 'base_route_name' => 'entity.configurable_language.edit_form', - 'title' => '!label language', + 'title' => '@label language', 'names' => array(), 'entity_type' => 'configurable_language', 'route_name' => 'config_translation.item.overview.entity.configurable_language.edit_form', diff --git a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php index 740b722..3a78357 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php @@ -50,7 +50,7 @@ protected function setUp() { $definition = array( 'class' => '\Drupal\config_translation\ConfigFieldMapper', 'base_route_name' => 'entity.field_config.node_field_edit_form', - 'title' => '!label field', + 'title' => '@label field', 'names' => array(), 'entity_type' => 'field_config', );