Commit 9a47d81c authored by catch's avatar catch

Issue #2585989 by pguillard, malavya: Fix grammar and consistent use of URL / UI PART

parent 00606660
......@@ -109,7 +109,7 @@ function aggregator_entity_extra_field_info() {
),
'feed_icon' => array(
'label' => t('Feed icon'),
'description' => t('An icon that links to the feed url'),
'description' => t('An icon that links to the feed URL'),
'weight' => 6,
),
),
......
......@@ -28,7 +28,7 @@ public function testAddFeed() {
$feed->refreshItems();
// Check feed data.
$this->assertUrl(\Drupal::url('aggregator.feed_add', [], ['absolute' => TRUE]), [], 'Directed to correct url.');
$this->assertUrl(\Drupal::url('aggregator.feed_add', [], ['absolute' => TRUE]), [], 'Directed to correct URL.');
$this->assertTrue($this->uniqueFeed($feed->label(), $feed->getUrl()), 'The feed is unique.');
// Check feed source.
......
......@@ -267,7 +267,7 @@ function testFilterAdmin() {
$this->drupalGet('admin/config/content/formats/manage/' . $format->id());
$this->assertFieldByName('roles[' . RoleInterface::AUTHENTICATED_ID . ']', '', 'Role found.');
$this->assertFieldByName('filters[' . $second_filter . '][status]', '', 'Line break filter found.');
$this->assertFieldByName('filters[' . $first_filter . '][status]', '', 'Url filter found.');
$this->assertFieldByName('filters[' . $first_filter . '][status]', '', 'URL filter found.');
// Disable new filter.
$this->drupalPostForm('admin/config/content/formats/manage/' . $format->id() . '/disable', array(), t('Disable'));
......
......@@ -238,7 +238,7 @@ function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_slash =
// image derivative using the first one as a source.
$nested_url = $this->style->buildUrl($generated_uri, $clean_url);
$matches_expected_url_format = (boolean) preg_match('/styles\/' . $this->style->id() . '\/' . $scheme . '\/styles\/' . $this->style->id() . '\/' . $scheme . '/', $nested_url);
$this->assertTrue($matches_expected_url_format, "Url for a derivative of an image style matches expected format.");
$this->assertTrue($matches_expected_url_format, "URL for a derivative of an image style matches expected format.");
$nested_url_with_wrong_token = str_replace(IMAGE_DERIVATIVE_TOKEN . '=', 'wrongparam=', $nested_url);
$this->drupalGet($nested_url_with_wrong_token);
$this->assertResponse(403, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token.');
......
......@@ -100,7 +100,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#tree' => TRUE,
'#title' => $this->t('Domain configuration'),
'#open' => TRUE,
'#description' => $this->t('The domain names to use for these languages. <strong>Modifying this value may break existing URLs. Use with caution in a production environment.</strong> Example: Specifying "de.example.com" as language domain for German will result in an URL like "http://de.example.com/contact".'),
'#description' => $this->t('The domain names to use for these languages. <strong>Modifying this value may break existing URLs. Use with caution in a production environment.</strong> Example: Specifying "de.example.com" as language domain for German will result in a URL like "http://de.example.com/contact".'),
'#states' => array(
'visible' => array(
':input[name="language_negotiation_url_part"]' => array(
......
......@@ -66,18 +66,18 @@ field.value.link:
mapping:
query:
type: sequence
label: 'Url query key value pairs'
label: 'URL query key value pairs'
sequence:
type: string
fragment:
type: string
label: 'Url fragment'
label: 'URL fragment'
absolute:
type: boolean
label: 'Is this Url absolute'
label: 'Is this URL absolute'
https:
type: boolean
label: 'If the Url should use a secure protocol'
label: 'If the URL should use a secure protocol'
attributes:
type: sequence
label: 'Link attributes'
......
......@@ -298,7 +298,7 @@ function doMenuTests() {
// Verify add link button.
$this->drupalGet('admin/structure/menu');
$this->assertLinkByHref('admin/structure/menu/manage/' . $menu_name . '/add', 0, "The add menu link button url is correct");
$this->assertLinkByHref('admin/structure/menu/manage/' . $menu_name . '/add', 0, "The add menu link button URL is correct");
// Verify form defaults.
$this->doMenuLinkFormDefaultsTest();
......
......@@ -28,7 +28,7 @@ public function testTemplates() {
$migration_templates = \Drupal::service('migrate.template_storage')->findTemplatesByTag("Template Test");
$expected_url = [
'id' => 'url_template',
'label' => 'Template test - url',
'label' => 'Template test - URL',
'migration_tags' => ['Template Test'],
'source' => ['plugin' => 'empty'],
'process' => ['src' => 'foobar'],
......@@ -56,7 +56,7 @@ public function testGetTemplateByName() {
$expected_url = [
'id' => 'url_template',
'label' => 'Template test - url',
'label' => 'Template test - URL',
'migration_tags' => ['Template Test'],
'source' => ['plugin' => 'empty'],
'process' => ['src' => 'foobar'],
......
id: url_template
label: Template test - url
label: Template test - URL
migration_tags:
- Template Test
source:
......
......@@ -90,8 +90,8 @@ public function fields(MigrationInterface $migration = NULL) {
return [
'pid' => 'The path id',
'source' => 'The source path.',
'alias' => 'The url alias.',
'langcode' => 'The language code for the url.',
'alias' => 'The URL alias.',
'langcode' => 'The language code for the URL.',
];
}
......
......@@ -27,7 +27,7 @@ public function query() {
public function fields() {
return array(
'pid' => $this->t('The numeric identifier of the path alias.'),
'language' => $this->t('The language code of the url alias.'),
'language' => $this->t('The language code of the URL alias.'),
);
}
......
......@@ -78,7 +78,7 @@ public function testSearchFormBlock() {
$this->assertEqual(
$this->getUrl(),
\Drupal::url('search.view_' . $entity_id, array(), array('query' => array('keys' => $terms['keys']), 'absolute' => TRUE)),
'Submitted to correct url.'
'Submitted to correct URL.'
);
// Test an empty search via the block form, from the front page.
......@@ -92,7 +92,7 @@ public function testSearchFormBlock() {
$this->assertEqual(
$this->getUrl(),
\Drupal::url('search.view_' . $entity_id, array(), array('query' => array('keys' => ''), 'absolute' => TRUE)),
'Redirected to correct url.'
'Redirected to correct URL.'
);
// Test that after entering a too-short keyword in the form, you can then
......
......@@ -61,13 +61,13 @@ function testShippedFileURL() {
\Drupal::state()->delete('file_test.hook_file_url_alter');
$filepath = 'core/misc/favicon.ico';
$url = file_create_url($filepath . '?foo');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '?foo=', $url, 'Correctly generated url. The query string is present.');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '?foo=', $url, 'Correctly generated URL. The query string is present.');
$url = file_create_url($filepath . '?foo=bar');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '?foo=bar', $url, 'Correctly generated url. The query string is present.');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '?foo=bar', $url, 'Correctly generated URL. The query string is present.');
$url = file_create_url($filepath . '#v1.2');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '#v1.2', $url, 'Correctly generated url. The fragment is present.');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '#v1.2', $url, 'Correctly generated URL. The fragment is present.');
$url = file_create_url($filepath . '?foo=bar#v1.2');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '?foo=bar#v1.2', $url, 'Correctly generated url. The query string amd fragment is present.');
$this->assertEqual($GLOBALS['base_url'] . '/' . $filepath . '?foo=bar#v1.2', $url, 'Correctly generated URL. The query string amd fragment is present.');
}
/**
......
......@@ -84,7 +84,7 @@ public function testConfirmFormWithExternalDestination() {
*/
public function assertCancelLinkUrl(Url $url, $message = '', $group = 'Other') {
$links = $this->xpath('//a[@href=:url]', [':url' => $url->toString()]);
$message = ($message ? $message : SafeMarkup::format('Cancel link with url %url found.', ['%url' => $url->toString()]));
$message = ($message ? $message : SafeMarkup::format('Cancel link with URL %url found.', ['%url' => $url->toString()]));
return $this->assertTrue(isset($links[0]), $message, $group);
}
......
......@@ -97,7 +97,7 @@ public function testRedirectFromErrorPages() {
$this->assertResponse(404);
$this->drupalPostForm(NULL, array(), t('Submit'));
$this->assertResponse(200);
$this->assertUrl($expected, [], 'Redirected to correct url/query.');
$this->assertUrl($expected, [], 'Redirected to correct URL/query.');
// Visit the block admin page (403 page) and submit the form. Verify it
// ends up at the right URL.
......@@ -105,6 +105,6 @@ public function testRedirectFromErrorPages() {
$this->assertResponse(403);
$this->drupalPostForm(NULL, array(), t('Submit'));
$this->assertResponse(200);
$this->assertUrl($expected, [], 'Redirected to correct url/query.');
$this->assertUrl($expected, [], 'Redirected to correct URL/query.');
}
}
......@@ -99,7 +99,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['path_case'] = array(
'#type' => 'select',
'#title' => $this->t('Case in path'),
'#description' => $this->t('When printing url paths, how to transform the case of the filter value. Do not use this unless with Postgres as it uses case sensitive comparisons.'),
'#description' => $this->t('When printing URL paths, how to transform the case of the filter value. Do not use this unless with Postgres as it uses case sensitive comparisons.'),
'#options' => array(
'none' => $this->t('No transform'),
'upper' => $this->t('Upper case'),
......
......@@ -1331,7 +1331,7 @@ public function optionsSummary(&$categories, &$options) {
'category' => 'pager',
'title' => $this->t('Link display'),
'value' => $link_display,
'desc' => $this->t('Specify which display or custom url this display will link to.'),
'desc' => $this->t('Specify which display or custom URL this display will link to.'),
);
}
......@@ -1485,7 +1485,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['use_more'] = array(
'#type' => 'checkbox',
'#title' => $this->t('Create more link'),
'#description' => $this->t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' section under pager. You can override the url at the link display setting."),
'#description' => $this->t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' section under pager. You can override the URL at the link display setting."),
'#default_value' => $this->getOption('use_more'),
);
$form['use_more_always'] = array(
......
......@@ -774,7 +774,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['alter']['path_case'] = array(
'#type' => 'select',
'#title' => $this->t('Transform the case'),
'#description' => $this->t('When printing url paths, how to transform the case of the filter value.'),
'#description' => $this->t('When printing URL paths, how to transform the case of the filter value.'),
'#states' => array(
'visible' => array(
':input[name="options[alter][make_link]"]' => array('checked' => TRUE),
......
......@@ -134,7 +134,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['url_field'] = array(
'#type' => 'select',
'#title' => $this->t('URL attribute'),
'#description' => $this->t('The field that is going to be used as the OPML url attribute for each row.'),
'#description' => $this->t('The field that is going to be used as the OPML URL attribute for each row.'),
'#options' => $view_fields_labels,
'#default_value' => $this->options['url_field'],
'#states' => array(
......
......@@ -74,7 +74,7 @@ public function testOpmlOutput() {
$outline = $this->xpath('//outline[1]');
$this->assertEqual($outline[0]['type'], 'link', 'The correct type attribute is used for link OPML.');
$this->assertEqual($outline[0]['text'], $feed->label(), 'The correct text attribute is used for link OPML.');
$this->assertEqual($outline[0]['url'], $feed->getUrl(), 'The correct url attribute is used for link OPML.');
$this->assertEqual($outline[0]['url'], $feed->getUrl(), 'The correct URL attribute is used for link OPML.');
// xmlUrl should not be present when type is link.
$this->assertNull($outline[0]['xmlUrl'], 'The xmlUrl attribute is not used for link OPML.');
}
......
......@@ -182,7 +182,7 @@ public function testLinkDisplay() {
// The form redirects to the master display.
$this->drupalGet($path);
$this->assertLink(t('Custom URL'), 0, 'The link option has custom url as summary.');
$this->assertLink(t('Custom URL'), 0, 'The link option has custom URL as summary.');
// Test the default link_url value for new display
$this->drupalPostForm(NULL, array(), t('Add Block'));
......
......@@ -44,7 +44,7 @@ public function testRedirect() {
$this->drupalPostForm($path_edit_path, array('path' => $new_path), t('Apply'));
$this->drupalPostForm($edit_path, array(), t('Save'), array('query' => array('destination' => 'test-redirect-view')));
$this->assertUrl($new_path, array(), 'Make sure the user got redirected to the expected page after changing the url of a page display.');
$this->assertUrl($new_path, array(), 'Make sure the user got redirected to the expected page after changing the URL of a page display.');
}
}
......@@ -246,7 +246,7 @@ public static function providerTestFilterQueryParameters() {
*/
public function testParse($url, $expected) {
$parsed = UrlHelper::parse($url);
$this->assertEquals($expected, $parsed, 'The url was not properly parsed.');
$this->assertEquals($expected, $parsed, 'The URL was not properly parsed.');
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment