diff --git a/core/modules/config_translation/src/ConfigMapperInterface.php b/core/modules/config_translation/src/ConfigMapperInterface.php index de8d356..57c1ccd 100644 --- a/core/modules/config_translation/src/ConfigMapperInterface.php +++ b/core/modules/config_translation/src/ConfigMapperInterface.php @@ -210,9 +210,6 @@ public function getLangcode(); * * @return string * The language code of the configuration object. - * - * @internal - * Fake interface. */ public function getLangcodeFromConfig($config_name); diff --git a/core/modules/config_translation/src/Controller/ConfigTranslationController.php b/core/modules/config_translation/src/Controller/ConfigTranslationController.php index 70855f5..927a1e2 100644 --- a/core/modules/config_translation/src/Controller/ConfigTranslationController.php +++ b/core/modules/config_translation/src/Controller/ConfigTranslationController.php @@ -3,7 +3,6 @@ namespace Drupal\config_translation\Controller; use Drupal\config_translation\ConfigMapperManagerInterface; -use Drupal\config_translation\ConfigNamesMapper; use Drupal\config_translation\Exception\ConfigMapperLanguageException; use Drupal\Core\Access\AccessManagerInterface; use Drupal\Core\Controller\ControllerBase; @@ -151,14 +150,17 @@ public function itemPage(Request $request, RouteMatchInterface $route_match, $pl $items = []; foreach ($mapper->getConfigNames() as $config_name) { $langcode = $mapper->getLangcodeFromConfig($config_name); - $items[] = $config_name . ': ' . $langcode; + $items[] = $this->t('@name: @langcode', [ + '@name' => $config_name, + '@langcode' => $langcode, + ]); } $message = [ 'message' => ['#markup' => $this->t('The configuration objects have different language codes so they cannot be translated:')], 'items' => [ '#theme' => 'item_list', '#items' => $items, - ] + ], ]; drupal_set_message($this->renderer->renderPlain($message), 'warning'); @@ -166,7 +168,6 @@ public function itemPage(Request $request, RouteMatchInterface $route_match, $pl $operations_access = FALSE; } - if (!isset($languages[$original_langcode])) { // If the language is not configured on the site, create a dummy language // object for this listing only to ensure the user gets useful info. diff --git a/core/modules/config_translation/src/Exception/ConfigMapperLanguageException.php b/core/modules/config_translation/src/Exception/ConfigMapperLanguageException.php index f5910c9..db4d202 100644 --- a/core/modules/config_translation/src/Exception/ConfigMapperLanguageException.php +++ b/core/modules/config_translation/src/Exception/ConfigMapperLanguageException.php @@ -1,8 +1,4 @@ typedConfigManager = $typed_config_manager;