From 5601dc41eabc908ede22a915358c45f42398aba7 Mon Sep 17 00:00:00 2001
From: nod_ <nod_@598310.no-reply.drupal.org>
Date: Thu, 20 Jun 2024 23:55:31 +0200
Subject: [PATCH] Issue #3455513 by xjm, e0ipso: "Single-Directory Components"
 needs to be hyphenated because of English grammar and content style rules

(cherry picked from commit 1a487f3b7cb69d2355afacd30220e6c3190797d4)
---
 core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php    | 6 +++---
 core/lib/Drupal/Core/Render/Element/ComponentElement.php | 4 ++--
 core/modules/sdc/sdc.info.yml                            | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
index 8b828c443b30..5e3c4c5d419a 100644
--- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
+++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php
@@ -403,7 +403,7 @@ protected function parseLibraryInfo($extension, $path) {
       }
     }
     // Core also provides additional libraries that don't come from the YAML,
-    // file nor the hook_library_info_build. They come from single directory
+    // file nor the hook_library_info_build. They come from single-directory
     // component definitions.
     $additional_libraries = $extension === 'core'
       ? $this->librariesForComponents()
@@ -478,10 +478,10 @@ protected function applyLibrariesMovedOverrides(array $library, string $library_
   }
 
   /**
-   * Builds the dynamic library definitions for single directory components.
+   * Builds the dynamic library definitions for single-directory components.
    *
    * @return array
-   *   The core library definitions for Single Directory Components.
+   *   The core library definitions for Single-Directory Components.
    */
   protected function librariesForComponents(): array {
     // Iterate over all the components to get the CSS and JS files.
diff --git a/core/lib/Drupal/Core/Render/Element/ComponentElement.php b/core/lib/Drupal/Core/Render/Element/ComponentElement.php
index 829c5f9f5815..20011dbd6ec1 100644
--- a/core/lib/Drupal/Core/Render/Element/ComponentElement.php
+++ b/core/lib/Drupal/Core/Render/Element/ComponentElement.php
@@ -8,7 +8,7 @@
 use Drupal\Core\Render\Component\Exception\InvalidComponentDataException;
 
 /**
- * Provides a Single Directory Component render element.
+ * Provides a Single-Directory Component render element.
  *
  * Properties:
  * - #component: The machine name of the component.
@@ -100,7 +100,7 @@ private function generateComponentTemplate(
     array $slots_alter_callbacks,
     array &$context,
   ): string {
-    $template = '{# This template was dynamically generated by single directory components #}' . PHP_EOL;
+    $template = '{# This template was dynamically generated by single-directory components #}' . PHP_EOL;
     $template .= sprintf('{%% embed \'%s\' %%}', $id);
     $template .= PHP_EOL;
     foreach ($slots as $slot_name => $slot_value) {
diff --git a/core/modules/sdc/sdc.info.yml b/core/modules/sdc/sdc.info.yml
index 98ef12cc4312..b6c3448e2e61 100644
--- a/core/modules/sdc/sdc.info.yml
+++ b/core/modules/sdc/sdc.info.yml
@@ -1,4 +1,4 @@
-name: Single Directory Components
+name: Single-Directory Components
 type: module
 description: 'Allows discovery and rendering of self-contained UI components.'
 version: VERSION
-- 
GitLab