Unverified Commit 5a811522 authored by alexpott's avatar alexpott

Issue #3138718 by sja112, longwave, dww, xjm, alexpott: Convert British...

Issue #3138718 by sja112, longwave, dww, xjm, alexpott: Convert British English spellings to American English, for the umpteenth time
parent 1abac3ff
......@@ -103,7 +103,7 @@ public function postCmd(Event $event) {
}
/**
* Post package event behaviour.
* Post package event behavior.
*
* @param \Composer\Installer\PackageEvent $event
* Composer package event sent on install/update/remove.
......
......@@ -448,7 +448,7 @@
/**
* Class Loader.
*
* If the APCu extension is detected, the classloader will be optimised to use
* If the APCu extension is detected, the classloader will be optimized to use
* it. Set to FALSE to disable this.
*
* @see https://getcomposer.org/doc/articles/autoloader-optimization.md
......
......@@ -131,15 +131,15 @@
$settings['skip_permissions_hardening'] = TRUE;
/**
* Exclude modules from configuration synchronisation.
* Exclude modules from configuration synchronization.
*
* On config export sync, no config or dependent config of any excluded module
* is exported. On config import sync, any config of any installed excluded
* module is ignored. In the exported configuration, it will be as if the
* excluded module had never been installed. When syncing configuration, if an
* excluded module is already installed, it will not be uninstalled by the
* configuration synchronisation, and dependent configuration will remain
* intact. This affects only configuration synchronisation; single import and
* configuration synchronization, and dependent configuration will remain
* intact. This affects only configuration synchronization; single import and
* export of configuration are not affected.
*
* Drupal does not validate or sanity check the list of excluded modules. For
......@@ -148,7 +148,7 @@
* anymore.
*
* This is an advanced feature and using it means opting out of some of the
* guarantees the configuration synchronisation provides. It is not recommended
* guarantees the configuration synchronization provides. It is not recommended
* to use this feature with modules that affect Drupal in a major way such as
* the language or field module.
*/
......
......@@ -19,7 +19,7 @@ class OpenOffCanvasDialogCommand extends OpenDialogCommand {
*
* The off-canvas dialog differs from the normal modal provided by
* OpenDialogCommand in that a off-canvas has built in positioning and
* behaviours. Drupal provides a built-in off-canvas dialog for this purpose,
* behaviors. Drupal provides a built-in off-canvas dialog for this purpose,
* so the selector is hard-coded in the call to the parent constructor.
*
* @param string $title
......
......@@ -154,7 +154,7 @@ final class ConfigEvents {
* Together with \Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_EXPORT
* subscribers can alter the active configuration in a config sync workflow
* instead of just overriding at runtime via the config-override system.
* This allows a complete customisation of the workflow including additional
* This allows a complete customization of the workflow including additional
* modules and editable configuration in different environments.
*
* @code
......
......@@ -160,7 +160,7 @@ protected function doLoadMultiple(array $names, $immutable = TRUE) {
// Pre-load remaining configuration files.
if (!empty($names)) {
// Initialise override information.
// Initialize override information.
$module_overrides = [];
$storage_data = $this->storage->readMultiple($names);
......
......@@ -83,7 +83,7 @@ public static function create(ContainerInterface $container) {
* save an entity. The callback can make changes to an entity. Note that all
* changes should comply with schema as an entity's data will not be
* validated against schema on save to avoid unexpected errors. If a
* callback is not provided, the default behaviour is to update the
* callback is not provided, the default behavior is to update the
* dependencies if required.
*
* @see hook_post_update_NAME()
......@@ -113,7 +113,7 @@ public function update(array &$sandbox, $entity_type_id, callable $callback = NU
$sandbox[self::SANDBOX_KEY]['count'] = count($sandbox[self::SANDBOX_KEY]['entities']);
}
// The default behaviour is to fix dependencies.
// The default behavior is to fix dependencies.
if ($callback === NULL) {
$callback = function ($entity) {
/** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
......
......@@ -12,7 +12,7 @@
* This service does not implement an interface and is final because it is not
* meant to be replaced, extended or used in a different context.
* Its single purpose is to transform a storage for the import step of a
* configuration synchronisation by dispatching the import transformation event.
* configuration synchronization by dispatching the import transformation event.
*/
final class ImportStorageTransformer {
......
......@@ -646,7 +646,7 @@ public function makeComment($comments) {
* "/ * Exploit * / DROP TABLE node. -- * / UPDATE example SET field2=..."
* @endcode
*
* Unless the comment is sanitised first, the SQL server would drop the
* Unless the comment is sanitized first, the SQL server would drop the
* node table and ignore the rest of the SQL statement.
*
* @param string $comment
......
......@@ -944,7 +944,7 @@ protected function populateAffectedRevisionTranslations(ContentEntityInterface $
* @param array $ids
* The entity key values to verify.
* @param string $entity_key
* (optional) The entity key to sanitise values for. Defaults to 'id'.
* (optional) The entity key to sanitize values for. Defaults to 'id'.
*
* @return array
* The sanitized list of entity key values.
......
......@@ -16,7 +16,7 @@ interface FieldableEntityStorageInterface extends EntityStorageInterface {
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
* The field for which to count data records.
* @param bool $as_bool
* (Optional) Optimises the query for checking whether there are any records
* (Optional) Optimizes the query for checking whether there are any records
* or not. Defaults to FALSE.
*
* @return bool|int
......
......@@ -498,7 +498,7 @@
* - \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider provides the same
* routes, set up to use the administrative theme for edit and delete pages.
* - You can also create your own class, extending one of these two classes if
* you only want to modify their behaviour slightly.
* you only want to modify their behavior slightly.
*
* To register any route provider class, add lines like the following to your
* entity class annotation:
......
......@@ -14,7 +14,7 @@ class NormalInstallerServiceProvider implements ServiceProviderInterface {
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
// Use a performance optimised module extension list.
// Use performance-optimized extension lists.
$container->getDefinition('extension.list.module')->setClass('Drupal\Core\Installer\InstallerModuleExtensionList');
$container->getDefinition('extension.list.theme')->setClass('Drupal\Core\Installer\InstallerThemeExtensionList');
$container->getDefinition('extension.list.theme_engine')->setClass('Drupal\Core\Installer\InstallerThemeEngineExtensionList');
......
......@@ -739,7 +739,7 @@ protected function ensureMarkupIsSafe(array $elements) {
$elements['#markup'] = Markup::create(Html::escape($elements['#plain_text']));
}
elseif (!($elements['#markup'] instanceof MarkupInterface)) {
// The default behaviour is to XSS filter using the admin tag list.
// The default behavior is to XSS filter using the admin tag list.
$tags = isset($elements['#allowed_tags']) ? $elements['#allowed_tags'] : Xss::getAdminTagList();
$elements['#markup'] = Markup::create(Xss::filter($elements['#markup'], $tags));
}
......
......@@ -10,7 +10,7 @@
use Symfony\Component\DependencyInjection\Reference;
/**
* Customises the container for running updates.
* Customizes the container for running updates.
*/
class UpdateServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
......
......@@ -10,7 +10,7 @@
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches summary behaviour entity form tabs.
* Attaches summary behavior entity form tabs.
*
* Specifically, it updates summaries to the revision information and the
* translation options.
......
......@@ -73,7 +73,7 @@
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches the tableDrag behaviour for blocks in block administration.
* Attaches the tableDrag behavior for blocks in block administration.
*/
Drupal.behaviors.blockDrag = {
attach(context, settings) {
......
......@@ -7,14 +7,14 @@
Drupal.ckeditor = Drupal.ckeditor || {};
/**
* Sets config behaviour and creates config views for the CKEditor toolbar.
* Sets config behavior and creates config views for the CKEditor toolbar.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches admin behaviour to the CKEditor buttons.
* Attaches admin behavior to the CKEditor buttons.
* @prop {Drupal~behaviorDetach} detach
* Detaches admin behaviour from the CKEditor buttons on 'unload'.
* Detaches admin behavior from the CKEditor buttons on 'unload'.
*/
Drupal.behaviors.ckeditorAdmin = {
attach(context) {
......@@ -412,7 +412,7 @@
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches show/hide behaviour to Plugin Settings buttons.
* Attaches show/hide behavior to Plugin Settings buttons.
*/
Drupal.behaviors.ckeditorAdminButtonPluginSettings = {
attach(context) {
......
......@@ -10,7 +10,7 @@
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches summary behaviour to the "drupalimage" settings vertical tab.
* Attaches summary behavior to the "drupalimage" settings vertical tab.
*/
Drupal.behaviors.ckeditorDrupalImageSettingsSummary = {
attach() {
......
......@@ -15,7 +15,7 @@
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches admin behaviour to the "stylescombo" button.
* Attaches admin behavior to the "stylescombo" button.
*/
Drupal.behaviors.ckeditorStylesComboSettings = {
attach(context) {
......@@ -110,7 +110,7 @@
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches summary behaviour to the plugin settings vertical tab.
* Attaches summary behavior to the plugin settings vertical tab.
*/
Drupal.behaviors.ckeditorStylesComboSettingsSummary = {
attach() {
......
......@@ -49,7 +49,7 @@
CKEDITOR.plugins.drupallink.registerLinkableWidget('image');
// Override default behaviour of 'drupalunlink' command.
// Override default behavior of 'drupalunlink' command.
editor.getCommand('drupalunlink').on('exec', function(evt) {
const widget = getFocusedWidget(editor);
......
......@@ -14,11 +14,11 @@
* The callback for when the color preview has been attached.
*
* @param {Element} context
* The context to initiate the color behaviour.
* The context to initiate the color behavior.
* @param {object} settings
* Settings for the color functionality.
* @param {HTMLFormElement} form
* The form to initiate the color behaviour on.
* The form to initiate the color behavior on.
* @param {object} farb
* The farbtastic object.
* @param {number} height
......
......@@ -71,7 +71,7 @@ public function testSiteNameTranslation() {
// determine the front page. This occurs before language negotiation causing
// the configuration factory to cache an object without the correct
// overrides. We are testing that the configuration factory is
// re-initialised after language negotiation. Ensure that it applies when
// re-initialized after language negotiation. Ensure that it applies when
// we access the XX front page.
// @see \Drupal\Core\PathProcessor::processInbound()
$this->drupalGet('xx');
......
......@@ -6,7 +6,7 @@
use Drupal\Tests\BrowserTestBase;
/**
* Tests the content translation behaviours on date formats.
* Tests the content translation behaviors on date formats.
*
* @group config_translation
*/
......@@ -40,7 +40,7 @@ protected function setUp(): void {
}
/**
* Tests date format translation behaviour.
* Tests date format translation behavior.
*/
public function testDateFormatUI() {
$this->drupalGet('admin/config/regional/date-time');
......
......@@ -337,9 +337,9 @@ public function moderatedEntityWithExistingIdTestCases() {
}
/**
* Test customising the default moderation state.
* Test customizing the default moderation state.
*/
public function testWorkflowCustomisedInitialState() {
public function testWorkflowCustomizedInitialState() {
$workflow = Workflow::load('editorial');
$configuration = $workflow->getTypePlugin()->getConfiguration();
......
......@@ -5,7 +5,7 @@
use Drupal\Tests\BrowserTestBase;
/**
* Tests the content translation behaviours on entity bundle UI.
* Tests the content translation behaviors on entity bundle UI.
*
* @group content_translation
*/
......@@ -31,7 +31,7 @@ protected function setUp(): void {
}
/**
* Tests content types default translation behaviour.
* Tests content types default translation behavior.
*/
public function testContentTypeUI() {
// Create first content type.
......
......@@ -118,7 +118,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
// The same base $path for the menu item (with a placeholder) can be
// used for all bundles of a given entity type; but depending on
// administrator settings, each bundle has a different set of view
// modes available for customisation. So we define menu items for all
// modes available for customization. So we define menu items for all
// view modes, and use a route requirement to determine which ones are
// actually visible for a given bundle.
$this->derivatives['field_form_display_default_' . $entity_type_id] = [
......
......@@ -84,7 +84,7 @@ public function normalize($field_item, $format = NULL, array $context = []) {
$embedded = $this->serializer->normalize($target_entity, $format, $context);
// @todo https://www.drupal.org/project/drupal/issues/3110815 $embedded will
// be NULL if the target entity does not exist. Use null coalescence
// operator to preserve behaviour in PHP 7.4.
// operator to preserve behavior in PHP 7.4.
$link = $embedded['_links']['self'] ?? NULL;
// If the field is translatable, add the langcode to the link relation
// object. This does not indicate the language of the target entity.
......
......@@ -19,7 +19,7 @@ class LanguageAddForm extends LanguageFormBase {
* {@inheritdoc}
*/
public function getFormId() {
// @todo Remove in favour of base method.
// @todo Remove in favor of base method.
return 'language_admin_add_form';
}
......
......@@ -15,7 +15,7 @@ class LanguageEditForm extends LanguageFormBase {
* {@inheritdoc}
*/
public function getFormId() {
// @todo Remove in favour of base method.
// @todo Remove in favor of base method.
return 'language_admin_edit_form';
}
......
name: 'Locale Test Development Release'
type: module
description: 'Helper module to test the behaviour when the core verison is a development release.'
description: 'Helper module to test the behavior when the core verison is a development release.'
package: Testing
version: VERSION
hidden: true
......@@ -14,7 +14,7 @@
* migration. The classic node migration and complete node migration have a
* different number of destination keys. This process plugin will ensure that
* when the complete node migration is used in the lookup the nid value is
* returned. This keeps the behaviour the same as the classic node migration.
* returned. This keeps the behavior the same as the classic node migration.
*
* @see \Drupal\migrate\Plugin\MigrateProcessInterface
*
......
......@@ -14,7 +14,7 @@
* migration. The classic node migration and complete node migration have a
* different number of destination keys. This process plugin will ensure that
* when the complete node migration is used in the lookup the vid value is
* returned. This keeps the behaviour the same as the classic node migration.
* returned. This keeps the behavior the same as the classic node migration.
*
* @see \Drupal\migrate\Plugin\MigrateProcessInterface
*
......
......@@ -14,7 +14,7 @@
* migration. The classic node migration and complete node migration have a
* different number of destination keys. This process plugin will ensure that
* when the complete node migration is used in the lookup the nid and langcode
* values are returned. This keeps the behaviour the same as the classic node
* values are returned. This keeps the behavior the same as the classic node
* migration.
*
* @see \Drupal\migrate\Plugin\MigrateProcessInterface
......
......@@ -208,7 +208,7 @@ public function getViewsData() {
'id' => 'node_nid',
'numeric' => TRUE,
];
// @todo the NID field needs different behaviour on revision/non-revision
// @todo the NID field needs different behavior on revision/non-revision
// tables. It would be neat if this could be encoded in the base field
// definition.
$data['node_field_revision']['nid']['relationship']['id'] = 'standard';
......
......@@ -6,7 +6,7 @@
/**
* This is copy of \EasyRdf_ParsedUri from the easyrdf/easyrdf library.
*
* It fixes a PHP 7.4 deprecation in \EasyRdf_ParsedUri::normalise().
* It fixes a PHP 7.4 deprecation in \EasyRdf_ParsedUri::normalize().
*
* @todo https://www.drupal.org/project/drupal/issues/3110972 Remove this work
* around.
......@@ -204,14 +204,14 @@ public function setFragment($fragment)
/**
* Normalises the path of this URI if it has one. Normalising a path means
* Normalizes the path of this URI if it has one. Normalizing a path means
* that any unnecessary '.' and '..' segments are removed. For example, the
* URI http://example.com/a/b/../c/./d would be normalised to
* URI http://example.com/a/b/../c/./d would be normalized to
* http://example.com/a/c/d
*
* @return object EasyRdf_ParsedUri
*/
public function normalise()
public function normalize()
{
if (empty($this->path)) {
return $this;
......@@ -253,7 +253,7 @@ public function normalise()
}
}
// Construct the new normalised path
// Construct the new normalized path
$this->path = implode('/', $newSegments);
// Allow easy chaining of methods
......@@ -313,7 +313,7 @@ public function resolve($relUri)
$target->fragment = $relUri->fragment;
$target->normalise();
$target->normalize();
return $target;
}
......
......@@ -244,7 +244,7 @@ public function testSerialize() {
'non_rev_field' => '<non_rev_field/>',
'field_test_text' => '<field_test_text><value>' . $this->values['field_test_text']['value'] . '</value><format>' . $this->values['field_test_text']['format'] . '</format><processed><![CDATA[<p>' . $this->values['field_test_text']['value'] . '</p>]]></processed></field_test_text>',
];
// Sort it in the same order as normalised.
// Sort it in the same order as normalized.
$expected = array_merge($normalized, $expected);
// Add header and footer.
array_unshift($expected, '<?xml version="1.0"?>' . PHP_EOL . '<response>');
......
......@@ -35,7 +35,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
];
$form['table']['another_row'] = [
'data' => [
'#title' => $this->t('my favourite fruit is <strong>@fruit</strong>', ['@fruit' => 'bananas']),
'#title' => $this->t('my favorite fruit is <strong>@fruit</strong>', ['@fruit' => 'bananas']),
'#markup' => '<p>some more text</p>',
],
];
......
......@@ -82,7 +82,7 @@ protected function assertLocalAction(array $actions) {
list($url, $title) = $action;
// SimpleXML gives us the unescaped text, not the actual escaped markup,
// so use a pattern instead to check the raw content.
// This behaviour is a bug in libxml, see
// This behavior is a bug in libxml, see
// https://bugs.php.net/bug.php?id=49437.
$this->assertPattern('@<a [^>]*class="[^"]*button-action[^"]*"[^>]*>' . preg_quote($title, '@') . '</@');
$this->assertEqual($elements[$index]->getAttribute('href'), $url->toString());
......
......@@ -82,7 +82,7 @@ protected function assertLocalTasks(array $routes, $level = 0) {
protected function assertLocalTaskAppers($title) {
// SimpleXML gives us the unescaped text, not the actual escaped markup,
// so use a pattern instead to check the raw content.
// This behaviour is a bug in libxml, see
// This behavior is a bug in libxml, see
// https://bugs.php.net/bug.php?id=49437.
return $this->assertPattern('@<a [^>]*>' . preg_quote($title, '@') . '</a>@');
}
......
......@@ -55,7 +55,7 @@ protected function setUp(): void {
->condition('name', 'core.extension')
->execute();
// Mimic the behaviour of ModuleInstaller::install() for removed post
// Mimic the behavior of ModuleInstaller::install() for removed post
// updates. Don't include the actual post updates because we want them to
// run.
$key_value = \Drupal::service('keyvalue');
......
......@@ -63,7 +63,7 @@ protected function setUp(): void {
* Tests hook_post_update_NAME().
*/
public function testRemovedPostUpdate() {
// Mimic the behaviour of ModuleInstaller::install().
// Mimic the behavior of ModuleInstaller::install().
$key_value = \Drupal::service('keyvalue');
$existing_updates = $key_value->get('post_update')->get('existing_updates', []);
......
......@@ -137,7 +137,7 @@
Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
const that = this;
this.exposedFormAjax = [];
// Exclude the reset buttons so no AJAX behaviours are bound. Many things
// Exclude the reset buttons so no AJAX behaviors are bound. Many things
// break during the form reset phase if using AJAX.
$('input[type=submit], input[type=image]', this.$exposed_form)
.not('[data-drupal-selector=edit-reset]')
......
......@@ -527,7 +527,7 @@ public function testSerialization() {
// Serialize the ViewExecutable as part of other data.
unserialize(serialize(['SOMETHING UNEXPECTED', $view_executable]));
// Make sure the serialisation of the ViewExecutable didn't influence the
// Make sure the serialization of the ViewExecutable didn't influence the
// field definitions.
$nid_definition_after = $field_manager->getBaseFieldDefinitions('node')['nid']
->getItemDefinition()
......
......@@ -611,7 +611,7 @@ public function renderPreview($display_id, $args = []) {
// Prepare the query information and statistics to show either above or
// below the view preview.
// Initialise the empty rows arrays so we can safely merge them later.
// Initialize the empty rows arrays so we can safely merge them later.
$rows['query'] = [];
$rows['statistics'] = [];
if ($show_info || $show_query || $show_stats) {
......
......@@ -59,7 +59,7 @@ public function testWorkspaceCanvasToggling() {
}
/**
* Test workspace switch and landing page behaviour.
* Test workspace switch and landing page behavior.
*/
public function testWorkspaceSwitch() {
$page = $this->getSession()->getPage();
......
......@@ -77,7 +77,7 @@ blockquote > * {
line-height: 1.5;
}
blockquote a {
/* Tweak default link colour to improve contrast for accessibility */
/* Tweak default link color to improve contrast for accessibility */
color: #057d6d;
}
blockquote a:hover,
......
......@@ -142,7 +142,7 @@ protected function assertJsCondition($condition, $timeout = 10000, $message = ''
* example, /tmp/test_screenshot.jpg.
* @param bool $set_background_color
* (optional) By default this method will set the background color to white.
* Set to FALSE to override this behaviour.
* Set to FALSE to override this behavior.
*
* @throws \Behat\Mink\Exception\UnsupportedDriverActionException
* When operation not supported by the driver.
......
......@@ -58,7 +58,7 @@ public function testVulnerableComment() {
// Check the returned number of rows.
$this->assertCount(4, $records);
// Check that the flattened query contains the sanitised comment string.
// Check that the flattened query contains the sanitized comment string.
$this->assertStringContainsString($expected, $query);
$connection = Database::getConnection();
......
......@@ -573,7 +573,7 @@ public function testNestedConditionGroups() {
*/
public function testConditionCount() {
// Query for all entities of the first bundle that
// have red as a colour AND are triangle shaped.
// have red as a color AND are triangle shaped.
$query = $this->storage->getQuery();
// Add an AND condition group with 2 conditions in it.
......
......@@ -65,7 +65,7 @@ protected function setUp(): void {
}
/**
* Tests form behaviour.
* Tests form behavior.
*/
public function testActionUrlBehavior() {
// Create a new request which has a request uri with multiple leading
......
......@@ -305,7 +305,7 @@ public function testThemeTableTitle() {
$form = \Drupal::formBuilder()->getForm('\Drupal\form_test\Form\FormTestTableForm');
$this->render($form);
$this->assertEscaped('Update <em>kitten</em>');
$this->assertRaw('Update my favourite fruit is <strong>bananas</strong>');
$this->assertRaw('Update my favorite fruit is <strong>bananas</strong>');
}
}
......@@ -48,7 +48,7 @@ public function testDrupalRenderThemePreprocessAttached() {
*/
public function testRenderChildren() {
// Ensure that #prefix and #suffix is only being printed once since that is
// the behaviour the caller code expects.
// the behavior the caller code expects.
$build = [
'#type' => 'container',
'#theme' => 'theme_test_render_element_children',
......
......@@ -14,7 +14,7 @@
* Tests \Drupal\TestTools\Comparator\MarkupInterfaceComparator.
*
* We need to test the class with a kernel test since casting MarkupInterface
* objects to strings can require an initialised container.
* objects to strings can require an initialized container.
*
* @group Test
*
......
......@@ -71,7 +71,7 @@ public function testLogoConfig() {
$theme_handler = $this->container->get('theme_handler');
$theme = $theme_handler->getTheme('stark');
// Tests default behaviour.
// Tests default behavior.
$expected = '/' .