Problem/Motivation
Followup to
π
Fix grammar ("an URL" should be "a URL") and consistent use of URL (not "url" / "Url") in documentation only, part 1
Fixed
: There are still a significant number of inline and docblock comments in core that lowercase "url" in sentences.
Proposed resolution
Correct the lowercase word "url" to "URL" where it is used in a sentence as a word (not referring to machine names, array keys, etc.)
[ayrton:drupal | Thu 15:33:42] $ grep -r " url" * | grep "\* " | grep -v "vendor" | grep -v "node_modules"
These still have lowercase uses that need to be changed:
core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php: * Enhances test urls with schemes.
core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php: * The list of urls.
core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php: * Enhances test urls with prefixes.
core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php: * The list of urls.
core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php: * Tests detecting external urls that point to local resources.
core/includes/theme.inc: * route_name + route_parameters or url (path), language, and query options
core/lib/Drupal/Core/Entity/Controller/EntityController.php: * The url generator.
core/lib/Drupal/Core/Mail/MailFormatHelper.php: * Internal array of urls replaced with tokens.
core/lib/Drupal/Core/Routing/RouteProvider.php: * restrictions on the url. That case is considered a not found - returning
core/lib/Drupal/Core/Routing/RouteProvider.php: * RouteCollection with all urls that could potentially match $request.
core/lib/Drupal/Core/Routing/UrlGenerator.php: * The path processor to convert the system path to one suitable for urls.
core/lib/Drupal/Core/Routing/UrlGenerator.php: * The path processor to convert the system path to one suitable for urls.
core/lib/Drupal/Core/Routing/RouteProviderInterface.php: * restrictions on the url. That case is considered a not found - returning
core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php: * The url generator.
core/lib/Drupal/Core/Utility/LinkGenerator.php: * The url generator.
core/lib/Drupal/Core/Utility/LinkGenerator.php: * The link text, url, and other options.
core/modules/file/tests/src/Kernel/FileUrlTest.php: * Tests the file url.
core/themes/olivero/templates/navigation/menu.html.twig: * - url: The menu link url, instance of \Drupal\Core\Url
core/themes/olivero/templates/navigation/menu--primary-menu.html.twig: * - url: The menu link url, instance of \Drupal\Core\Url
core/themes/olivero/templates/navigation/menu--secondary-menu.html.twig: * - url: The menu link url, instance of \Drupal\Core\Url
From:
[ayrton:drupal | Thu 15:40:35] $ grep -r " url" * | grep " // " | grep -v "vendor" | grep -v "node_modules"
core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php: // Set the update url. This must be set here rather than in
core/tests/Drupal/Tests/BrowserTestBase.php: // Generate a route to prime the url generator with the correct base url.
core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php: // Invalid destination urls.
core/lib/Drupal/Core/Form/ConfirmFormHelper.php: // Suppress the exception and fall back to the form's cancel url.
core/lib/Drupal/Core/Asset/JsOptimizer.php: // Remove JS source and source mapping urls or these may cause 404 errors.
core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php: // entity's url. Since we don't know what the markup of the entity will
core/lib/Drupal/Core/Command/DbCommandBase.php: // Load connection from a url.
core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php: // removed from the url.
core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php: // Ensure that resource link contains url with the alias field.
core/modules/file/tests/src/Functional/DownloadTest.php: // Try requesting the private file url without a file specified.
core/modules/views_ui/tests/src/Functional/DisplayPathTest.php: // Links should be url-encoded.
core/modules/views_ui/src/ViewEditForm.php: // Find out the first display which has a changed path and redirect to this url.
core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarApiTest.js: // Clear escapeAdmin url values.
core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarTest.js: // Clear escapeAdmin url values.
core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php: // Set language detection to url and browser detection.
core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php: // from overwriting the url.
core/modules/user/tests/src/Functional/UserPasswordResetTest.php: // Ensure that the current url does not contain the hash and timestamp.
core/modules/user/src/Plugin/views/argument_validator/UserName.php: // argument so it works for example for generation summary urls.
core/modules/forum/src/Controller/ForumController.php: // the url.
core/modules/system/tests/src/Functional/System/AdminTest.php: // match the redirected url.
core/modules/system/tests/src/Kernel/Mail/MailTest.php: // Test root relative urls.
core/modules/system/tests/src/Kernel/Mail/MailTest.php: // Test protocol relative urls.
core/modules/system/tests/src/Kernel/Mail/MailTest.php: // Test absolute urls.
core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php: // Retrieve the autocomplete url.
core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php: // Visit the view's page url and validate the results.
core/modules/ckeditor5/ckeditor5.module: // CSS url is external or relative to Drupal root.
core/modules/ckeditor5/ckeditor5.module: // CSS url is relative to theme.
core/modules/filter/filter.module: // and allow @ in a url, but only in the middle. Catch things like http://example.com/@user/
core/modules/node/tests/src/Functional/NodeTranslationUITest.php: // Need to check from the beginning, including the base_path, in the url
core/modules/views/js/ajax_view.js: // If there is a '?' in ajaxPath, clean url are on and & should be
core/modules/views/js/base.js: // Get viewPath url without baseUrl portion.
core/modules/views/js/base.js: // 3 is the length of the '?q=' added to the url without clean urls.
core/modules/views/tests/src/Functional/Plugin/DisplayTest.php: // Test more link with absolute url.
core/modules/views/tests/src/Functional/Plugin/DisplayTest.php: // Test more link with query parameters in the url.
core/modules/views/tests/src/Functional/Plugin/DisplayTest.php: // Test more link with fragment in the url.
core/modules/views/src/Plugin/views/display/DisplayPluginBase.php: // Return the display URL if there is no custom url.
core/modules/views/src/Plugin/views/display/DisplayPluginBase.php: // Create url.
Remaining tasks
- First, fix the above cases of lowercased "url" in core docs.
- Followup to discuss and potentially fix "Url" in sentences (which may in some cases refer to a
Drupal\Core\Url
object).
User interface changes
None.
API changes
None.
Data model changes
None.