Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words

merge-requests/6433/head
Dave Long 2024-02-02 11:44:34 +00:00
parent 614ff9d255
commit 2624df1b1c
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
27 changed files with 64 additions and 75 deletions

View File

@ -307,8 +307,8 @@ interface FormBuilderInterface {
* run before user input for its child elements is processed, and because of
* the Form API security of user input processing with respect to #access and
* #disabled described above, this generally means that #process functions
* should not use an element's (unvalidated) #value to affect the #disabled or
* #access of child elements. Use-cases where a developer may be tempted to
* should not use an element's (non validated) #value to affect the #disabled
* or #access of child elements. Use-cases where a developer may be tempted to
* implement such conditional logic usually fall into one of two categories:
* - Where user input from the current submission must affect the structure of
* a form, including properties like #access and #disabled that affect how

View File

@ -258,7 +258,7 @@ class FormState implements FormStateInterface {
/**
* The array of values as they were submitted by the user.
*
* These are raw and unvalidated, so should not be used without a thorough
* These are raw and non validated, so should not be used without a thorough
* understanding of security implications. In almost all cases, code should
* use the data in the 'values' array exclusively. The most common use of this
* key is for multi-step forms that need to clear some of the user input when

View File

@ -301,7 +301,7 @@ interface FormStateInterface {
/**
* Returns the form values as they were submitted by the user.
*
* These are raw and unvalidated, so should not be used without a thorough
* These are raw and non validated, so should not be used without a thorough
* understanding of security implications. In almost all cases, code should
* use self::getValues() and self::getValue() exclusively.
*
@ -314,7 +314,7 @@ interface FormStateInterface {
* Sets the form values as though they were submitted by a user.
*
* @param array $user_input
* An associative array of raw and unvalidated values.
* An associative array of raw and non validated values.
*
* @return $this
*/

View File

@ -35,7 +35,7 @@ interface FormValidatorInterface {
* in case of a validation error. If a validation handler alters the form
* structure, it is responsible for validating the values of changed form
* elements in $form_state->getValues() to prevent form submit handlers from
* receiving unvalidated values.
* receiving non validated values.
* @param $form_state
* The current state of the form. The current user-submitted data is stored
* in $form_state->getValues(), though form validation functions are passed

View File

@ -9,7 +9,8 @@ use Drupal\Core\Render\BubbleableMetadata;
* Used to return generated links, along with associated cacheability metadata.
*
* Note: not to be confused with \Drupal\Core\Link, which is for passing around
* ungenerated links (typically link text + route name + route parameters).
* links that are not generated (typically link text + route name + route
* parameters).
*/
class GeneratedLink extends BubbleableMetadata implements MarkupInterface, \Countable {

View File

@ -8,7 +8,7 @@ use Drupal\Core\Render\BubbleableMetadata;
* Used to return generated URLs, along with associated bubbleable metadata.
*
* Note: not to be confused with \Drupal\Core\Url, which is for passing around
* ungenerated URLs (typically route name + route parameters).
* URLs that are not generated (typically route name + route parameters).
*/
class GeneratedUrl extends BubbleableMetadata {

View File

@ -176,7 +176,7 @@ class StreamWrapperManager implements StreamWrapperManagerInterface {
}
/**
* Unregisters the tagged stream wrappers.
* Deregisters the tagged stream wrappers.
*
* Internal use only.
*/

View File

@ -884,18 +884,11 @@ typehints
tzid
uids
ulwa
unassigning
unassigns
unban
unbans
unbundleable
uncacheable
uncategorized
unclickable
uncollapsible
undoable
unfieldable
ungenerated
ungroup
ungroupable
unindexed
@ -904,13 +897,10 @@ uninstallations
unmanaged
unminified
unmoderated
unparseable
unpromote
unpromoted
unpublish
unpublishes
unpublishing
unregisters
unrevisionable
unrouted
unsanitized
@ -922,8 +912,6 @@ unsets
unsetting
unsticky
untabbable
unvalidated
unwrapper
upcasted
upcasting
updateprogress

View File

@ -35,7 +35,7 @@ interface BanIpManagerInterface {
public function banIp($ip);
/**
* Unbans an IP address.
* Removes the ban of an IP address.
*
* @param string $id
* The IP address to unban.

View File

@ -45,11 +45,11 @@ class CodeBlock extends CKEditor5PluginDefault implements CKEditor5PluginConfigu
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
$form_value = $form_state->getValue('languages');
[$styles, $unparseable_lines] = self::parseLanguagesFromValue($form_value);
if (!empty($unparseable_lines)) {
$line_numbers = array_keys($unparseable_lines);
[$styles, $not_parseable_lines] = self::parseLanguagesFromValue($form_value);
if (!empty($not_parseable_lines)) {
$line_numbers = array_keys($not_parseable_lines);
$form_state->setError($form['languages'], $this->formatPlural(
count($unparseable_lines),
count($not_parseable_lines),
'Line @line-number does not contain a valid value. Enter a valid language key followed by a pipe symbol and a label.',
'Lines @line-numbers do not contain a valid value. Enter a valid language key followed by a pipe symbol and a label.',
[
@ -73,7 +73,7 @@ class CodeBlock extends CKEditor5PluginDefault implements CKEditor5PluginConfigu
* - language: the key for the language
*/
protected static function parseLanguagesFromValue(string $form_value): array {
$unparseable_lines = [];
$not_parseable_lines = [];
$lines = explode("\n", $form_value);
$languages = [];
@ -90,7 +90,7 @@ class CodeBlock extends CKEditor5PluginDefault implements CKEditor5PluginConfigu
'language' => $language,
];
}
return [$languages, $unparseable_lines];
return [$languages, $not_parseable_lines];
}
/**

View File

@ -68,11 +68,11 @@ class Style extends CKEditor5PluginDefault implements CKEditor5PluginConfigurabl
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
// Match the config schema structure at ckeditor5.plugin.ckeditor5_style.
$form_value = $form_state->getValue('styles');
[$styles, $unparseable_lines] = self::parseStylesFormValue($form_value);
if (!empty($unparseable_lines)) {
$line_numbers = array_keys($unparseable_lines);
[$styles, $invalid_lines] = self::parseStylesFormValue($form_value);
if (!empty($invalid_lines)) {
$line_numbers = array_keys($invalid_lines);
$form_state->setError($form['styles'], $this->formatPlural(
count($unparseable_lines),
count($invalid_lines),
'Line @line-number does not contain a valid value. Enter a valid CSS selector containing one or more classes, followed by a pipe symbol and a label.',
'Lines @line-numbers do not contain a valid value. Enter a valid CSS selector containing one or more classes, followed by a pipe symbol and a label.',
[
@ -104,7 +104,7 @@ class Style extends CKEditor5PluginDefault implements CKEditor5PluginConfigurabl
* @see \Drupal\ckeditor5\Plugin\CKEditor4To5Upgrade\Core::mapCKEditor4SettingsToCKEditor5Configuration()
*/
public static function parseStylesFormValue(string $form_value): array {
$unparseable_lines = [];
$invalid_lines = [];
$lines = explode("\n", $form_value);
$styles = [];
@ -120,7 +120,7 @@ class Style extends CKEditor5PluginDefault implements CKEditor5PluginConfigurabl
$selector_matches = [];
// @see https://www.w3.org/TR/CSS2/syndata.html#:~:text=In%20CSS%2C%20identifiers%20(including%20element,hyphen%20followed%20by%20a%20digit
if (!preg_match('/^([a-z][0-9a-zA-Z\-]*)((\.[a-zA-Z0-9\x{00A0}-\x{FFFF}\-_]+)+)$/u', $selector, $selector_matches)) {
$unparseable_lines[$index + 1] = $line;
$invalid_lines[$index + 1] = $line;
continue;
}
@ -134,7 +134,7 @@ class Style extends CKEditor5PluginDefault implements CKEditor5PluginConfigurabl
'element' => $normalized->toCKEditor5ElementsArray()[0],
];
}
return [$styles, $unparseable_lines];
return [$styles, $invalid_lines];
}
/**

View File

@ -1965,7 +1965,7 @@ abstract class ResourceTestBase extends BrowserTestBase {
}
// Try with all of the following request bodies.
$unparseable_request_body = '!{>}<';
$not_parseable_request_body = '!{>}<';
$parseable_valid_request_body = Json::encode($this->getPostDocument());
$parseable_invalid_request_body_missing_type = Json::encode($this->removeResourceTypeFromDocument($this->getPostDocument()));
if ($this->entity->getEntityType()->hasKey('label')) {
@ -2014,9 +2014,9 @@ abstract class ResourceTestBase extends BrowserTestBase {
$response = $this->request('POST', $url, $request_options);
$this->assertResourceErrorResponse(400, 'Empty request body.', $url, $response, FALSE);
$request_options[RequestOptions::BODY] = $unparseable_request_body;
$request_options[RequestOptions::BODY] = $not_parseable_request_body;
// DX: 400 when unparseable request body.
// DX: 400 when un-parseable request body.
$response = $this->request('POST', $url, $request_options);
$this->assertResourceErrorResponse(400, 'Syntax error', $url, $response, FALSE);
@ -2185,7 +2185,7 @@ abstract class ResourceTestBase extends BrowserTestBase {
$this->anotherEntity = $this->createAnotherEntity('dupe');
// Try with all of the following request bodies.
$unparseable_request_body = '!{>}<';
$not_parseable_request_body = '!{>}<';
$parseable_valid_request_body = Json::encode($this->getPatchDocument());
if ($this->entity->getEntityType()->hasKey('label')) {
$parseable_invalid_request_body = Json::encode($this->makeNormalizationInvalid($this->getPatchDocument(), 'label'));
@ -2237,9 +2237,9 @@ abstract class ResourceTestBase extends BrowserTestBase {
$response = $this->request('PATCH', $url, $request_options);
$this->assertResourceErrorResponse(400, 'Empty request body.', $url, $response, FALSE);
$request_options[RequestOptions::BODY] = $unparseable_request_body;
$request_options[RequestOptions::BODY] = $not_parseable_request_body;
// DX: 400 when unparseable request body.
// DX: 400 when un-parseable request body.
$response = $this->request('PATCH', $url, $request_options);
$this->assertResourceErrorResponse(400, 'Syntax error', $url, $response, FALSE);

View File

@ -176,14 +176,14 @@ class LayoutBuilderDisableInteractionsTest extends WebDriverTestBase {
}
/**
* Checks if element is unclickable.
* Checks if element is not clickable.
*
* @param \Behat\Mink\Element\NodeElement $element
* Element being checked for.
*
* @internal
*/
protected function assertElementUnclickable(NodeElement $element): void {
protected function assertElementNotClickable(NodeElement $element): void {
try {
$element->click();
$tag_name = $element->getTagName();
@ -205,11 +205,11 @@ class LayoutBuilderDisableInteractionsTest extends WebDriverTestBase {
$this->assertNotEmpty($assert_session->waitForElement('css', '.block-search'));
$searchButton = $assert_session->buttonExists('Search');
$this->assertElementUnclickable($searchButton);
$this->assertElementNotClickable($searchButton);
$assert_session->linkExists('Take me away');
$this->assertElementUnclickable($page->findLink('Take me away'));
$this->assertElementNotClickable($page->findLink('Take me away'));
$iframe = $assert_session->elementExists('css', '#iframe-that-should-be-disabled');
$this->assertElementUnclickable($iframe);
$this->assertElementNotClickable($iframe);
}
/**

View File

@ -925,8 +925,8 @@ class MediaLibraryWidget extends WidgetBase implements TrustedCallbackInterface
*/
protected static function getNewMediaItems(array $element, FormStateInterface $form_state) {
// Get the new media IDs passed to our hidden button. We need to use the
// actual user input, since when #limit_validation_errors is used, the
// unvalidated user input is not added to the form state.
// actual user input, since when #limit_validation_errors is used, any
// non validated user input is not added to the form state.
// @see FormValidator::handleErrorsWithLimitedValidation()
$values = $form_state->getUserInput();
$path = $element['#parents'];
@ -961,7 +961,7 @@ class MediaLibraryWidget extends WidgetBase implements TrustedCallbackInterface
// Default to using the current selection if the form is new.
$path = $element['#parents'];
// We need to use the actual user input, since when #limit_validation_errors
// is used, the unvalidated user input is not added to the form state.
// is used, the non validated user input is not added to the form state.
// @see FormValidator::handleErrorsWithLimitedValidation()
$values = NestedArray::getValue($form_state->getUserInput(), $path);
$selection = $values['selection'] ?? [];

View File

@ -184,7 +184,7 @@ class EntityContentBase extends Entity implements HighestIdInterface, MigrateVal
*/
public function isEntityValidationRequired(FieldableEntityInterface $entity) {
// Prioritize the entity method over migration config because it won't be
// possible to save that entity unvalidated.
// possible to save that entity non validated.
/* @see \Drupal\Core\Entity\ContentEntityBase::preSave() */
return $entity->isValidationRequired() || !empty($this->configuration['validate']);
}

View File

@ -38,9 +38,9 @@ class NodeAccessRecordsTest extends NodeAccessTestBase {
$this->assertEquals('test_article_realm', $records[0]->realm, 'Grant with article_realm acquired for node without alteration.');
$this->assertEquals(1, $records[0]->gid, 'Grant with gid = 1 acquired for node without alteration.');
// Create an unpromoted "Basic page" node.
// Create an un-promoted "Basic page" node.
$node2 = $this->drupalCreateNode(['type' => 'page', 'promote' => 0]);
$this->assertNotEmpty(Node::load($node2->id()), 'Unpromoted basic page node created.');
$this->assertNotEmpty(Node::load($node2->id()), 'Un-promoted basic page node created.');
// Check to see if grants added by node_test_node_access_records made it in.
$records = $connection->select('node_access', 'na')
@ -52,9 +52,9 @@ class NodeAccessRecordsTest extends NodeAccessTestBase {
$this->assertEquals('test_page_realm', $records[0]->realm, 'Grant with page_realm acquired for node without alteration.');
$this->assertEquals(1, $records[0]->gid, 'Grant with gid = 1 acquired for node without alteration.');
// Create an unpromoted, unpublished "Basic page" node.
// Create an un-promoted, unpublished "Basic page" node.
$node3 = $this->drupalCreateNode(['type' => 'page', 'promote' => 0, 'status' => 0]);
$this->assertNotEmpty(Node::load($node3->id()), 'Unpromoted, unpublished basic page node created.');
$this->assertNotEmpty(Node::load($node3->id()), 'Un-promoted, unpublished basic page node created.');
// Check to see if grants added by node_test_node_access_records made it in.
$records = $connection->select('node_access', 'na')

View File

@ -692,7 +692,7 @@ abstract class EntityResourceTestBase extends ResourceTestBase {
$has_canonical_url = $this->entity->hasLinkTemplate('canonical');
// Try with all of the following request bodies.
$unparseable_request_body = '!{>}<';
$not_parseable_request_body = '!{>}<';
$parseable_valid_request_body = $this->serializer->encode($this->getNormalizedPostEntity(), static::$format);
$parseable_invalid_request_body = $this->serializer->encode($this->makeNormalizationInvalid($this->getNormalizedPostEntity(), 'label'), static::$format);
$parseable_invalid_request_body_2 = $this->serializer->encode($this->getNormalizedPostEntity() + ['uuid' => [$this->randomMachineName(129)]], static::$format);
@ -756,9 +756,9 @@ abstract class EntityResourceTestBase extends ResourceTestBase {
$response = $this->request('POST', $url, $request_options);
$this->assertResourceErrorResponse(400, 'No entity content received.', $response);
$request_options[RequestOptions::BODY] = $unparseable_request_body;
$request_options[RequestOptions::BODY] = $not_parseable_request_body;
// DX: 400 when unparseable request body.
// DX: 400 when un-parseable request body.
$response = $this->request('POST', $url, $request_options);
$this->assertResourceErrorResponse(400, 'Syntax error', $response);
@ -869,7 +869,7 @@ abstract class EntityResourceTestBase extends ResourceTestBase {
$has_canonical_url = $this->entity->hasLinkTemplate('canonical');
// Try with all of the following request bodies.
$unparseable_request_body = '!{>}<';
$not_parseable_request_body = '!{>}<';
$parseable_valid_request_body = $this->serializer->encode($this->getNormalizedPatchEntity(), static::$format);
$parseable_invalid_request_body = $this->serializer->encode($this->makeNormalizationInvalid($this->getNormalizedPatchEntity(), 'label'), static::$format);
$parseable_invalid_request_body_2 = $this->serializer->encode($this->getNormalizedPatchEntity() + ['field_rest_test' => [['value' => $this->randomString()]]], static::$format);
@ -948,9 +948,9 @@ abstract class EntityResourceTestBase extends ResourceTestBase {
$response = $this->request('PATCH', $url, $request_options);
$this->assertResourceErrorResponse(400, 'No entity content received.', $response);
$request_options[RequestOptions::BODY] = $unparseable_request_body;
$request_options[RequestOptions::BODY] = $not_parseable_request_body;
// DX: 400 when unparseable request body.
// DX: 400 when un-parseable request body.
$response = $this->request('PATCH', $url, $request_options);
$this->assertResourceErrorResponse(400, 'Syntax error', $response);

View File

@ -21,7 +21,7 @@ interface ShortcutSetStorageInterface extends ConfigEntityStorageInterface {
public function assignUser(ShortcutSetInterface $shortcut_set, $account);
/**
* Unassigns a user from any shortcut set they may have been assigned to.
* Un-assigns a user from any shortcut set they may have been assigned to.
*
* The user will go back to using whatever default set applies.
*

View File

@ -172,7 +172,7 @@ class ShortcutSetsTest extends ShortcutTestBase {
}
/**
* Tests unassigning a shortcut set.
* Tests un-assigning a shortcut set.
*/
public function testShortcutSetUnassign() {
$new_set = $this->generateShortcutSet($this->randomMachineName());

View File

@ -14,7 +14,7 @@ details {
details > .details-wrapper {
padding: 0.5em 1.5em;
}
/* @todo Regression: The summary of uncollapsible details are no longer
/* @todo Regression: The summary of noncollapsible details are no longer
vertically aligned with the .details-wrapper in browsers without native
details support. */
summary {

View File

@ -111,7 +111,7 @@ class AjaxTest extends WebDriverTestBase {
'svg' => '<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><rect x="0" y="0" height="10" width="10" fill="green"></rect></svg>',
'empty' => '',
];
$render_multiple_root_unwrapper = [
$render_multiple_root_unwrap = [
'mixed' => ' foo <!-- COMMENT --> foo bar<div class="a class"><p>some string</p></div> additional not wrapped strings, <!-- ANOTHER COMMENT --> <p>final string</p>',
'top-level-only' => '<div>element #1</div><div>element #2</div>',
'top-level-only-pre-whitespace' => ' <div>element #1</div><div>element #2</div> ',
@ -121,14 +121,14 @@ class AjaxTest extends WebDriverTestBase {
// This is temporary behavior for BC reason.
$render_multiple_root_wrapper = [];
foreach ($render_multiple_root_unwrapper as $key => $render) {
foreach ($render_multiple_root_unwrap as $key => $render) {
$render_multiple_root_wrapper["$key--effect"] = '<div>' . $render . '</div>';
}
$expected_renders = array_merge(
$render_single_root,
$render_multiple_root_wrapper,
$render_multiple_root_unwrapper
$render_multiple_root_unwrap
);
// Checking default process of wrapping Ajax content.

View File

@ -70,8 +70,8 @@ class EntityDeriverTest extends KernelTestBase {
*/
public function derivativesProvider() {
return [
'unbundleable entity type with no bundle type' => ['entity:user', FALSE],
'unbundleable entity type with bundle type' => ['entity:user:user', TRUE],
'un-bundleable entity type with no bundle type' => ['entity:user', FALSE],
'un-bundleable entity type with bundle type' => ['entity:user:user', TRUE],
'bundleable entity type with no bundle type' => ['entity:node', FALSE],
'bundleable entity type with bundle type' => [
'entity:node:article',
@ -81,11 +81,11 @@ class EntityDeriverTest extends KernelTestBase {
'entity:comment:comment',
FALSE,
],
'unbundleable entity type with entity_test_entity_bundle_info()-generated bundle type' => [
'un-bundleable entity type with entity_test_entity_bundle_info()-generated bundle type' => [
'entity:entity_test_no_bundle:foo',
FALSE,
],
'unbundleable entity type with entity_test_entity_bundle_info()-generated bundle type with matching name' => [
'un-bundleable entity type with entity_test_entity_bundle_info()-generated bundle type with matching name' => [
'entity:entity_test_no_bundle:entity_test_no_bundle',
FALSE,
],

View File

@ -91,7 +91,7 @@ abstract class Random {
/**
* Generates a unique random string containing letters and numbers.
*
* Do not use this method when testing unvalidated user input. Instead, use
* Do not use this method when testing non validated user input. Instead, use
* \Drupal\Tests\RandomGeneratorTrait::randomString().
*
* @param int $length

View File

@ -170,7 +170,7 @@ class FakeAutoloader {
}
/**
* Unregisters this instance as an autoloader.
* Deregisters this instance as an autoloader.
*/
public function unregister() {
spl_autoload_unregister([$this, 'loadClass']);

View File

@ -199,7 +199,7 @@ abstract class RendererTestBase extends UnitTestCase {
* paths, etc. for JavaScript replacement of content or assets. In this test,
* the #lazy_builder callback PlaceholdersTest::callback() renders the context
* inside test HTML, so using any random string would sometimes cause random
* test failures because the test output would be unparseable. Instead, we
* test failures because the test output would not be parseable. Instead, we
* provide random tokens for replacement.
*
* @see PlaceholdersTest::callback()

View File

@ -58,7 +58,7 @@ trait RandomGeneratorTrait {
/**
* Generates a unique random string containing letters and numbers.
*
* Do not use this method when testing unvalidated user input. Instead, use
* Do not use this method when testing non validated user input. Instead, use
* \Drupal\Tests\RandomGeneratorTrait::randomString().
*
* @param int $length

View File

@ -14,7 +14,7 @@ details {
details > .details-wrapper {
padding: 0.5em 1.5em;
}
/* @todo Regression: The summary of uncollapsible details are no longer
/* @todo Regression: The summary of noncollapsible details are no longer
vertically aligned with the .details-wrapper in browsers without native
details support. */
summary {