From da9c5ba24d3cdc67ce45909dcbe754b1f5ef8fcb Mon Sep 17 00:00:00 2001 From: xjm Date: Wed, 13 Sep 2017 21:47:52 -0500 Subject: [PATCH] Issue #2902728 by mfernea: Fix 'Drupal.Semantics.FunctionT.BackslashSingleQuote' coding standard --- core/modules/block/src/Plugin/migrate/source/Block.php | 2 +- core/modules/ckeditor/ckeditor.module | 2 +- core/modules/color/color.module | 2 +- core/modules/field/field.module | 2 +- core/modules/language/language.module | 6 +++--- .../tests/src/Unit/source/d6/Drupal6SqlBaseTest.php | 8 ++++---- .../taxonomy/src/Plugin/views/argument_default/Tid.php | 2 +- core/modules/taxonomy/taxonomy.module | 2 +- .../taxonomy/tests/src/Functional/VocabularyUiTest.php | 2 +- core/modules/user/src/Tests/UserPasswordResetTest.php | 2 +- core/modules/user/user.module | 2 +- core/phpcs.xml.dist | 1 - 12 files changed, 16 insertions(+), 17 deletions(-) diff --git a/core/modules/block/src/Plugin/migrate/source/Block.php b/core/modules/block/src/Plugin/migrate/source/Block.php index 6ec421c8ff..2ef0beff0c 100644 --- a/core/modules/block/src/Plugin/migrate/source/Block.php +++ b/core/modules/block/src/Plugin/migrate/source/Block.php @@ -84,7 +84,7 @@ public function fields() { return [ 'bid' => $this->t('The block numeric identifier.'), 'module' => $this->t('The module providing the block.'), - 'delta' => $this->t('The block\'s delta.'), + 'delta' => $this->t("The block's delta."), 'theme' => $this->t('Which theme the block is placed in.'), 'status' => $this->t('Whether or not the block is enabled.'), 'weight' => $this->t('Weight of the block for ordering within regions.'), diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index 7905253440..39d80c05b5 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -29,7 +29,7 @@ function ckeditor_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Toggling between formatted text and HTML source') . '
'; $output .= '
' . t('If the Source button is available in the toolbar, users can click this button to disable the visual editor and edit the HTML source directly. After toggling back, the visual editor uses the allowed HTML tags to format the text — independent of whether buttons for these tags are available in the toolbar. If the text format is set to limit the use of HTML tags, then all excluded tags will be stripped out of the HTML source when the user toggles back to the text editor.') . '
'; $output .= '
' . t('Check my spelling as I type') . '
'; - $output .= '
' . t('By default, CKEditor is configured to leverage your browser\'s spell check capability. Make sure your browser\'s spell checker is enabled in your browser\'s settings. To access suggested corrections for misspelled words, it may be necessary to hold the Control or command (Mac) key while right-clicking the misspelling.') . '
'; + $output .= '
' . t("By default, CKEditor is configured to leverage your browser's spell check capability. Make sure your browser's spell checker is enabled in your browser's settings. To access suggested corrections for misspelled words, it may be necessary to hold the Control or command (Mac) key while right-clicking the misspelling.") . '
'; $output .= '
' . t('Accessibility features') . '
'; $output .= '
' . t('The built in WYSIWYG editor (CKEditor) comes with a number of accessibility features. CKEditor comes with built in keyboard shortcuts, which can be beneficial for both power users and keyboard only users.', [':features' => 'http://docs.ckeditor.com/#!/guide/dev_a11y', ':shortcuts' => 'http://docs.ckeditor.com/#!/guide/dev_shortcuts']) . '
'; $output .= '
' . t('Generating accessible content') . '
'; diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 20d099abcf..84abac1f50 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -28,7 +28,7 @@ function color_help($route_name, RouteMatchInterface $route_match) { $output .= '
'; $output .= '
' . t('Changing colors') . '
'; $output .= '

' . t('To change the color settings, select the Settings link for your theme on the Appearance page. If the color picker does not appear then the theme is not compatible with the Color module.', [':appearance' => \Drupal::url('system.themes_page')]) . '

'; - $output .= '

' . t('The Color module saves a modified copy of the theme\'s specified stylesheets in the files directory. If you make any manual changes to your theme\'s stylesheet, you must save your color settings again, even if you haven\'t changed the colors. This step is required because the module stylesheets in the files directory need to be recreated to reflect your changes.') . '

'; + $output .= '

' . t("The Color module saves a modified copy of the theme's specified stylesheets in the files directory. If you make any manual changes to your theme's stylesheet, you must save your color settings again, even if you haven't changed the colors. This step is required because the module stylesheets in the files directory need to be recreated to reflect your changes.") . '

'; $output .= '
'; return $output; } diff --git a/core/modules/field/field.module b/core/modules/field/field.module index 8f3877d0f3..1a18b91d73 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -74,7 +74,7 @@ function field_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Terminology') . '

'; $output .= '
'; $output .= '
' . t('Entities and entity types') . '
'; - $output .= '
' . t('The website\'s content and configuration is managed using entities, which are grouped into entity types. Content entity types are the entity types for site content (such as the main site content, comments, custom blocks, taxonomy terms, and user accounts). Configuration entity types are used to store configuration information for your site, such as individual views in the Views module, and settings for your main site content types.') . '
'; + $output .= '
' . t("The website's content and configuration is managed using entities, which are grouped into entity types. Content entity types are the entity types for site content (such as the main site content, comments, custom blocks, taxonomy terms, and user accounts). Configuration entity types are used to store configuration information for your site, such as individual views in the Views module, and settings for your main site content types.") . '
'; $output .= '
' . t('Entity sub-types') . '
'; $output .= '
' . t('Some content entity types are further grouped into sub-types (for example, you could have article and page content types within the main site content entity type, and tag and category vocabularies within the taxonomy term entity type); other entity types, such as user accounts, do not have sub-types. Programmers use the term bundle for entity sub-types.') . '
'; $output .= '
' . t('Fields and field types') . '
'; diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 8066aa9194..91163f7ce0 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -43,15 +43,15 @@ function language_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Making a block visible per language') . '
'; $output .= '
' . t('If the Block module is enabled, then the Language module allows you to set the visibility of a block based on selected languages on the Block layout page.', [':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#']) . '
'; $output .= '
' . t('Choosing user languages') . '
'; - $output .= '
' . t('Users can choose a Site language on their profile page. This language is used for email messages, and can be used by modules to determine a user\'s language. It can also be used for interface text, if the User method is enabled as a Detection and selection method (see below). Administrative users can choose a separate Administration pages language for the interface text on administration pages. This configuration is only available on the user\'s profile page if the Account administration pages method is enabled (see below).') . '
'; + $output .= '
' . t("Users can choose a Site language on their profile page. This language is used for email messages, and can be used by modules to determine a user's language. It can also be used for interface text, if the User method is enabled as a Detection and selection method (see below). Administrative users can choose a separate Administration pages language for the interface text on administration pages. This configuration is only available on the user's profile page if the Account administration pages method is enabled (see below).") . '
'; $output .= '
' . t('Language detection and selection') . '
'; $output .= '
' . t('The Detection and selection page provides several methods for deciding which language is used for displaying interface text. When a method detects and selects an interface language, then the following methods in the list are not applied. You can order them by importance, with your preferred method at the top of the list, followed by one or several fall-back methods.', [':detection' => \Drupal::url('language.negotiation')]); $output .= '
  • ' . t('URL sets the interface language based on a path prefix or domain (for example specifying de for German would result in URLs like example.com/de/contact). The default language does not require a path prefix, but can have one assigned as well. If the language detection is done by domain name, a domain needs to be specified for each language.') . '
  • '; $output .= '
  • ' . t('Session determines the interface language from a request or session parameter (for example example.com?language=de would set the interface language to German based on the use of de as the language parameter).') . '
  • '; - $output .= '
  • ' . t('User follows the language configuration set on the user\'s profile page.') . '
  • '; + $output .= '
  • ' . t("User follows the language configuration set on the user's profile page.") . '
  • '; $output .= '
  • ' . t('Browser sets the interface language based on the browser\'s language settings. Since browsers use different language codes to refer to the same languages, you can add and edit languages codes to map the browser language codes to the language codes used on your site.', [':language_list' => \Drupal::url('entity.configurable_language.collection')]) . '
  • '; $output .= '
  • ' . t('Account administration pages follows the configuration set as Administration pages language on the profile page of an administrative user. This method is similar to the User method, but only sets the interface text language on administration pages, independent of the interface text language on other pages.') . '
  • '; - $output .= '
  • ' . t('Selected language allows you to specify the site\'s default language or a specific language as the fall-back language. This method should be listed last.') . '
'; + $output .= '
  • ' . t("Selected language allows you to specify the site's default language or a specific language as the fall-back language. This method should be listed last.") . '
  • '; $output .= '
    '; return $output; diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php index 55d128227d..e8866d6f10 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php @@ -150,10 +150,10 @@ public function fields() { 'owner' => t("A theme's 'parent'. Can be either a theme or an engine."), 'status' => t('Boolean indicating whether or not this item is enabled.'), 'throttle' => t('Boolean indicating whether this item is disabled when the throttle.module disables throttleable items.'), - 'bootstrap' => t('Boolean indicating whether this module is loaded during Drupal\'s early bootstrapping phase (e.g. even before the page cache is consulted).'), - 'schema_version' => t('The module\'s database schema version number.'), - 'weight' => t('The order in which this module\'s hooks should be invoked.'), - 'info' => t('A serialized array containing information from the module\'s .info file.'), + 'bootstrap' => t("Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted)."), + 'schema_version' => t("The module's database schema version number."), + 'weight' => t("The order in which this module's hooks should be invoked."), + 'info' => t("A serialized array containing information from the module's .info file."), ]; } diff --git a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php index fa1865474a..ee5a2602d8 100644 --- a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php +++ b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php @@ -116,7 +116,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ]; $form['node'] = [ '#type' => 'checkbox', - '#title' => $this->t('Load default filter from node page, that\'s good for related taxonomy blocks'), + '#title' => $this->t("Load default filter from node page, that's good for related taxonomy blocks"), '#default_value' => $this->options['node'], ]; diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 4a93989ad5..11c959f4b8 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -61,7 +61,7 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) { $output .= '
    ' . t('Classifying entity content') . '
    '; $output .= '
    ' . t('A user with the Administer fields permission for a certain entity type may add Taxonomy term reference fields to the entity type, which will allow entities to be classified using taxonomy terms. See the Entity Reference help for more information about reference fields. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them.', [':field_ui' => $field_ui_url, ':field' => \Drupal::url('help.page', ['name' => 'field']), ':entity_reference' => \Drupal::url('help.page', ['name' => 'entity_reference'])]) . '
    '; $output .= '
    ' . t('Adding new terms during content creation') . '
    '; - $output .= '
    ' . t('Allowing users to add new terms gradually builds a vocabulary as content is added and edited. Users can add new terms if either of the two Autocomplete widgets is chosen for the Taxonomy term reference field in the Manage form display page for the field. You will also need to enable the Create referenced entities if they don\'t already exist option, and restrict the field to one vocabulary.') . '
    '; + $output .= '
    ' . t("Allowing users to add new terms gradually builds a vocabulary as content is added and edited. Users can add new terms if either of the two Autocomplete widgets is chosen for the Taxonomy term reference field in the Manage form display page for the field. You will also need to enable the Create referenced entities if they don't already exist option, and restrict the field to one vocabulary.") . '
    '; $output .= '
    ' . t('Configuring displays and form displays') . '
    '; $output .= '
    ' . t('See the Entity Reference help page for the field widgets and formatters that can be configured for any reference field on the Manage display and Manage form display pages. Taxonomy additionally provides an RSS category formatter that displays nothing when the entity item is displayed as HTML, but displays an RSS category instead of a list when the entity item is displayed in an RSS feed.', [':entity_reference' => \Drupal::url('help.page', ['name' => 'entity_reference'])]) . ''; $output .= ''; diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php index 80ea2d7585..9d477105bf 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php @@ -77,7 +77,7 @@ public function testVocabularyInterface() { $this->drupalPostForm('admin/structure/taxonomy/add', $edit, t('Save')); $site_name = $this->config('system.site')->get('name'); - $this->assertTitle(t('Don\'t Panic | @site-name', ['@site-name' => $site_name]), 'The page title contains the escaped character.'); + $this->assertTitle(t("Don't Panic | @site-name", ['@site-name' => $site_name]), 'The page title contains the escaped character.'); } /** diff --git a/core/modules/user/src/Tests/UserPasswordResetTest.php b/core/modules/user/src/Tests/UserPasswordResetTest.php index 528d38bc96..673c598cd7 100644 --- a/core/modules/user/src/Tests/UserPasswordResetTest.php +++ b/core/modules/user/src/Tests/UserPasswordResetTest.php @@ -130,7 +130,7 @@ public function testUserPasswordReset() { // Verify that the password reset session has been destroyed. $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('Your current password is missing or incorrect; it\'s required to change the Password.'), 'Password needed to make profile changes.'); + $this->assertText(t("Your current password is missing or incorrect; it's required to change the Password."), 'Password needed to make profile changes.'); // Log out, and try to log in again using the same one-time link. $this->drupalLogout(); diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 61faa3b4f0..6edc284df7 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -169,7 +169,7 @@ function user_entity_extra_field_info() { $fields['user']['user']['display']['member_for'] = [ 'label' => t('Member for'), - 'description' => t('User module \'member for\' view element.'), + 'description' => t("User module 'member for' view element."), 'weight' => 5, ]; diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index f992e69933..59b33c4ab3 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -89,7 +89,6 @@ - -- 2.22.2