From 4890e11da3131f80d6606370c35159b6801e6484 Mon Sep 17 00:00:00 2001 From: Pamela Barone <31375-pameeela@users.noreply.drupalcode.org> Date: Tue, 26 Nov 2024 21:56:08 +0000 Subject: [PATCH] Issue #3488078 by pameeela, shalini_jha, chrisfromredfin, ankitv18: Minor updates to labels and descriptions --- project_browser.module | 2 +- src/Plugin/ProjectBrowserSource/DrupalCore.php | 4 ++-- src/Plugin/ProjectBrowserSource/DrupalDotOrgJsonApi.php | 6 +++--- src/Plugin/ProjectBrowserSourceBase.php | 6 +++--- tests/src/FunctionalJavascript/ProjectBrowserUiTest.php | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/project_browser.module b/project_browser.module index df690ca54..329bffad7 100644 --- a/project_browser.module +++ b/project_browser.module @@ -51,7 +51,7 @@ function project_browser_project_browser_source_info_alter(array &$definitions): $definitions['recipes'] = [ 'id' => 'recipes', 'label' => t('Recipes'), - 'description' => t('Shows recipes available in the local code base.'), + 'description' => t('Recipes available in the local code base'), 'class' => Recipes::class, ]; } diff --git a/src/Plugin/ProjectBrowserSource/DrupalCore.php b/src/Plugin/ProjectBrowserSource/DrupalCore.php index 174def6de..8c75a93e4 100644 --- a/src/Plugin/ProjectBrowserSource/DrupalCore.php +++ b/src/Plugin/ProjectBrowserSource/DrupalCore.php @@ -18,8 +18,8 @@ use Symfony\Component\HttpFoundation\RequestStack; * * @ProjectBrowserSource( * id = "drupal_core", - * label = @Translation("Core Modules"), - * description = @Translation("Gets core projects and filters information"), + * label = @Translation("Core modules"), + * description = @Translation("Modules included in Drupal core"), * ) */ class DrupalCore extends ProjectBrowserSourceBase { diff --git a/src/Plugin/ProjectBrowserSource/DrupalDotOrgJsonApi.php b/src/Plugin/ProjectBrowserSource/DrupalDotOrgJsonApi.php index 8b4ce57b1..962eb26e3 100644 --- a/src/Plugin/ProjectBrowserSource/DrupalDotOrgJsonApi.php +++ b/src/Plugin/ProjectBrowserSource/DrupalDotOrgJsonApi.php @@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\Response; * * @ProjectBrowserSource( * id = "drupalorg_jsonapi", - * label = @Translation("Contrib Modules"), + * label = @Translation("Contrib modules"), * description = @Translation("Modules on Drupal.org queried via the JSON:API endpoint"), * ) */ @@ -703,11 +703,11 @@ class DrupalDotOrgJsonApi extends ProjectBrowserSourceBase { return [ 'best_match' => [ 'id' => 'best_match', - 'text' => $this->t('Most Relevant'), + 'text' => $this->t('Most relevant'), ], 'created' => [ 'id' => 'created', - 'text' => $this->t('Newest First'), + 'text' => $this->t('Newest first'), ], ]; } diff --git a/src/Plugin/ProjectBrowserSourceBase.php b/src/Plugin/ProjectBrowserSourceBase.php index c63cbf984..17accd58e 100644 --- a/src/Plugin/ProjectBrowserSourceBase.php +++ b/src/Plugin/ProjectBrowserSourceBase.php @@ -58,7 +58,7 @@ abstract class ProjectBrowserSourceBase extends PluginBase implements ProjectBro return [ 'usage_total' => [ 'id' => 'usage_total', - 'text' => $this->t('Most Popular'), + 'text' => $this->t('Most popular'), ], 'a_z' => [ 'id' => 'a_z', @@ -70,11 +70,11 @@ abstract class ProjectBrowserSourceBase extends PluginBase implements ProjectBro ], 'created' => [ 'id' => 'created', - 'text' => $this->t('Newest First'), + 'text' => $this->t('Newest first'), ], 'best_match' => [ 'id' => 'best_match', - 'text' => $this->t('Most Relevant'), + 'text' => $this->t('Most relevant'), ], ]; } diff --git a/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php b/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php index cc06f8bf9..3dfcfd068 100644 --- a/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php +++ b/tests/src/FunctionalJavascript/ProjectBrowserUiTest.php @@ -452,10 +452,10 @@ class ProjectBrowserUiTest extends WebDriverTestBase { $this->svelteInitHelper('text', 'Clear Filters'); $this->pressWithWait('Clear filters'); $assert_session->elementsCount('css', '#pb-sort option', 4); - $this->assertEquals('Most Popular', $this->getElementText('#pb-sort option:nth-child(1)')); + $this->assertEquals('Most popular', $this->getElementText('#pb-sort option:nth-child(1)')); $this->assertEquals('A-Z', $this->getElementText('#pb-sort option:nth-child(2)')); $this->assertEquals('Z-A', $this->getElementText('#pb-sort option:nth-child(3)')); - $this->assertEquals('Newest First', $this->getElementText('#pb-sort option:nth-child(4)')); + $this->assertEquals('Newest first', $this->getElementText('#pb-sort option:nth-child(4)')); // Select 'A-Z' sorting order. $this->sortBy('a_z'); -- GitLab