diff --git a/core/lib/Drupal/Core/Path/AliasStorageInterface.php b/core/lib/Drupal/Core/Path/AliasStorageInterface.php index 598f986..63cb942 100644 --- a/core/lib/Drupal/Core/Path/AliasStorageInterface.php +++ b/core/lib/Drupal/Core/Path/AliasStorageInterface.php @@ -20,7 +20,7 @@ * @param string $source * The internal system path. * @param string $alias - * The URL alias. This will be converted to lower case. + * The URL alias. This will be converted to lowercase. * @param string $langcode * (optional) The language code of the alias. * @param int|null $pid @@ -98,7 +98,7 @@ public function lookupPathAlias($path, $langcode); * * @param string $path * The path to investigate for corresponding system URLs. This will be - * converted to lower case. + * converted to lowercase. * @param string $langcode * Language code to search the path with. If there's no path defined for * that language it will search paths without language. @@ -112,7 +112,7 @@ public function lookupPathSource($path, $langcode); * Checks if alias already exists. * * @param string $alias - * Alias to check against. This will be converted to lower case. + * Alias to check against. This will be converted to lowercase. * @param string $langcode * Language of the alias. * @param string|null $source @@ -138,7 +138,7 @@ public function languageAliasExists(); * Table header. * @param string|null $keys * (optional) Search keyword that may include one or more '*' as a wildcard - * value. This will be converted to lower case. + * value. This will be converted to lowercase. * * @return array * Array of items to be displayed on the current page. diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php index 5d51a85..e79ab45 100644 --- a/core/lib/Drupal/Core/Routing/RouteBuilder.php +++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php @@ -186,14 +186,14 @@ public function rebuild() { // static defined ones. $this->dispatcher->dispatch(RoutingEvents::DYNAMIC, new RouteBuildEvent($collection)); // Process the whole collection since we cannot tell what was newly added. - $this->lowerCaseCollection($collection); + $this->lowercaseCollection($collection); // ALTER is the final step to alter all the existing routes. We cannot stop // people from adding new routes here, but we define two separate steps to // make it clear. $this->dispatcher->dispatch(RoutingEvents::ALTER, new RouteBuildEvent($collection)); // Process the whole collection since we cannot tell what was changed. - $this->lowerCaseCollection($collection); + $this->lowercaseCollection($collection); $this->checkProvider->setChecks($collection); @@ -230,14 +230,14 @@ public function destruct() { } /** - * Lower cases the path for each route in the collection. + * Lowercases the path for each route in the collection. * * @param \Symfony\Component\Routing\RouteCollection $collection * A route collection. */ - protected function lowerCaseCollection(RouteCollection $collection) { + protected function lowercaseCollection(RouteCollection $collection) { foreach ($collection->all() as $route) { - // Force each path to be lower case. + // Force each path to be lowercase. $path = Unicode::strtolower($route->getPath()); $route->setPath($path); } diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php index 63fa818..947c96d 100644 --- a/core/lib/Drupal/Core/Routing/RouteProvider.php +++ b/core/lib/Drupal/Core/Routing/RouteProvider.php @@ -150,7 +150,7 @@ public function __construct(Connection $connection, StateInterface $state, Curre */ public function getRouteCollectionForRequest(Request $request) { // Cache both the system path as well as route parameters and matching - // routes. We can not yet convert the path to lower case since wildcard path + // routes. We can not yet convert the path to lowercase since wildcard path // portions may be case sensitive if they contain data like a base64 encoded // token. $cid = 'route:' . $request->getPathInfo() . ':' . $request->getQueryString(); @@ -323,7 +323,7 @@ public function getRoutesByPattern($pattern) { * * @param string $path * The route pattern to search for (contains % as placeholders). Will be - * converted to lower case. + * converted to lowercase. * * @return \Symfony\Component\Routing\RouteCollection * Returns a route collection of matching routes. diff --git a/core/lib/Drupal/Core/Routing/UrlMatcher.php b/core/lib/Drupal/Core/Routing/UrlMatcher.php index 74c46a5..f82cd35 100644 --- a/core/lib/Drupal/Core/Routing/UrlMatcher.php +++ b/core/lib/Drupal/Core/Routing/UrlMatcher.php @@ -51,7 +51,7 @@ public function finalMatch(RouteCollection $collection, Request $request) { * Tries to match a URL with a set of routes. * * This version differs from the Symfony parent version in two respects. - * First, the $pathinfo string is converted to lower case. In addition, we + * First, the $pathinfo string is converted to lowercase. In addition, we * remove the check against any static prefix since we would already have * matched the static prefix in \Drupal\Core\Routing\RouteProvider before * arriving here. @@ -74,8 +74,8 @@ protected function matchCollection($pathinfo, RouteCollection $routes) { /** @var \Symfony\Component\Routing\Route $route */ $compiledRoute = $route->compile(); - // Convert the path to lower case, so that we match the patterns from - // routes where we forced all paths to be lower case. + // Convert the path to lowercase, so that we match the patterns from + // routes where we forced all paths to be lowercase. // @see \Drupal\Core\Routing\RouteBuilder::rebuild() // @see \Drupal\Core\Routing\RouteProvider::getRoutesByPath() if (!preg_match($compiledRoute->getRegex(), Unicode::strtolower($pathinfo), $matches)) { diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 65fbf69..dbb8d97 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -21,13 +21,13 @@ function path_help($route_name, RouteMatchInterface $route_match) { $output = ''; $output .= '

' . t('About') . '

'; $output .= '

' . t('The Path module allows you to specify an alias, or custom URL, for any existing internal system path. Aliases should not be confused with URL redirects, which allow you to forward a changed or inactive URL to a new URL. In addition to making URLs more readable, aliases also help search engines index content more effectively. Multiple aliases may be used for a single internal system path. To automate the aliasing of paths, you can install the contributed module Pathauto. For more information, see the online documentation for the Path module.', array(':path' => 'https://www.drupal.org/documentation/modules/path', ':pathauto' => 'https://www.drupal.org/project/pathauto')) . '

'; - $output .= '

' . t('Aliases must be unique, are converted to lower case, and are matched in a case insensitive fashion.'); + $output .= '

' . t('Aliases must be unique, are converted to lowercase, and are matched in a case insensitive fashion.'); $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating aliases') . '
'; $output .= '
' . t('If you create or edit a taxonomy term you can add a unique alias (for example /music/jazz) in the field "URL alias". When creating or editing content you can add an alias (for example /about-us/team) under the section "URL path settings" in the field "URL alias". Aliases for any other path can be added through the page URL aliases. To add aliases a user needs the permission Create and edit URL aliases.', array(':aliases' => \Drupal::url('path.admin_overview'), ':permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-path')))) . '
'; $output .= '
' . t('Managing aliases') . '
'; - $output .= '
' . t('The Path module provides a way to search and view a list of all aliases that are in use on your website. Aliases need to be unique and are converted to lower case. Aliases can be added, edited and deleted through this list.', array(':aliases' => \Drupal::url('path.admin_overview'))) . '
'; + $output .= '
' . t('The Path module provides a way to search and view a list of all aliases that are in use on your website. Aliases need to be unique and are converted to lowercase. Aliases can be added, edited and deleted through this list.', array(':aliases' => \Drupal::url('path.admin_overview'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/path/src/Form/PathFormBase.php b/core/modules/path/src/Form/PathFormBase.php index 0cff597..e296b6c 100644 --- a/core/modules/path/src/Form/PathFormBase.php +++ b/core/modules/path/src/Form/PathFormBase.php @@ -116,7 +116,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $pid = NU '#default_value' => $this->path['alias'], '#maxlength' => 255, '#size' => 45, - '#description' => $this->t('Specify an alternative path by which this data can be accessed. For example, type "/about" when writing an about page. Use a relative path with a slash in front. The path alias will be converted to lower case and must be unique.'), + '#description' => $this->t('Specify an alternative path by which this data can be accessed. For example, type "/about" when writing an about page. Use a relative path with a slash in front. The path alias will be converted to lowercase and must be unique.'), '#field_prefix' => $this->requestContext->getCompleteBaseUrl(), '#required' => TRUE, ); diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php index bbe1ec4..277f383 100644 --- a/core/modules/system/src/Tests/Routing/RouterTest.php +++ b/core/modules/system/src/Tests/Routing/RouterTest.php @@ -222,7 +222,7 @@ public function testRoutePathMixedCase() { /** @var \Drupal\Core\Routing\RouteProvider $route_provider */ $route_provider = $this->container->get('router.route_provider'); $route2 = $route_provider->getRouteByName('router_test.mixedcase.2'); - // Verify that the route path is stored as lower case despite being defined + // Verify that the route path is stored as lowercase despite being defined // with mixed case in the YAML file. $this->assertIdentical('/router_test/mixedcase2', $route2->getPath()); $this->drupalGet('/router_test/mixEDCASE2'); @@ -238,7 +238,7 @@ public function testRoutePathMixedCase() { $this->assertRaw('test2', 'The correct string was returned because the route was successful.'); $route3 = $route_provider->getRouteByName('router_test.mixedcase.3'); - // Verify that the variable name in the route path is stored as lower case + // Verify that the variable name in the route path is stored as lowercase // despite being defined with mixed case in the YAML file. $this->assertIdentical('/router_test/mixedcase3/{value}', $route3->getPath());