Commit 615123f5 authored by catch's avatar catch

Issue #2286655 by alexpott, attiks, mark_fullmer, nielsonm, Mark Slatinek,...

Issue #2286655 by alexpott, attiks, mark_fullmer, nielsonm, Mark Slatinek, quietone, catch, dawehner, aburke626, justafish: Gender neutral language
parent dfa4cdeb
......@@ -1389,8 +1389,8 @@ function install_select_language(&$install_state) {
return install_get_form('Drupal\Core\Installer\Form\SelectLanguageForm', $install_state);
}
// If we are performing a non-interactive installation. If only one language
// (English) is available, assume the user knows what he is doing. Otherwise
// throw an error.
// (English) is available, assume the user is correct. Otherwise throw an
// error.
else {
if (count($files) == 1) {
$install_state['parameters']['langcode'] = current(array_keys($files));
......
......@@ -9,7 +9,7 @@
/**
* Defines a compiler pass to allow automatic override per backend.
*
* A module developer has to tag his backend service with "backend_overridable":
* A module developer has to tag a backend service with "backend_overridable":
* @code
* custom_service:
* class: ...
......
......@@ -22,7 +22,7 @@ interface MailManagerInterface extends PluginManagerInterface {
* recipients.
*
* Finding out what language to send the email with needs some consideration.
* If you send email to a user, her preferred language should be fine, so use
* If you send email to a user, use
* \Drupal\Core\Session\AccountInterface::getPreferredAdminLangcode(). If you
* send email based on form values filled on the page, there are two
* additional choices if you are not sending the email to a user on the site.
......
......@@ -26,21 +26,21 @@
* Usage example:
* @code
* $header = [
* 'first_name' => $this->t('First Name'),
* 'last_name' => $this->t('Last Name'),
* 'color' => $this->t('Color'),
* 'shape' => $this->t('Shape'),
* ];
*
* $options = [
* 1 => ['first_name' => 'Indy', 'last_name' => 'Jones'],
* 2 => ['first_name' => 'Darth', 'last_name' => 'Vader'],
* 3 => ['first_name' => 'Super', 'last_name' => 'Man'],
* 1 => ['color' => 'Red', 'shape' => 'Triangle'],
* 2 => ['color' => 'Green', 'shape' => 'Square'],
* 3 => ['color' => 'Blue', 'shape' => 'Hexagon'],
* ];
*
* $form['table'] = array(
* '#type' => 'tableselect',
* '#header' => $header,
* '#options' => $options,
* '#empty' => $this->t('No users found'),
* '#empty' => $this->t('No shapes found'),
* );
* @endcode
*
......
......@@ -123,7 +123,7 @@ public function gc($lifetime) {
// value. For example, if you want user sessions to stay in your database
// for three weeks before deleting them, you need to set gc_maxlifetime
// to '1814400'. At that value, only after a user doesn't log in after
// three weeks (1814400 seconds) will his/her session be removed.
// three weeks (1814400 seconds) will their session be removed.
$this->connection->delete('sessions')
->condition('timestamp', REQUEST_TIME - $lifetime, '<')
->execute();
......
......@@ -28,7 +28,6 @@ class BlockLanguageTest extends BrowserTestBase {
protected function setUp() {
parent::setUp();
// Create a new user, allow him to manage the blocks and the languages.
$this->adminUser = $this->drupalCreateUser(['administer blocks', 'administer languages']);
$this->drupalLogin($this->adminUser);
......
......@@ -53,7 +53,7 @@ public function testUserConfig() {
$this->assertSame('is - Fix your password', $config->get('password_reset.subject'));
$this->assertSame("is - Nope! You're locked out forever.", $config->get('password_reset.body'));
$this->assertSame('is - Gawd made you an account', $config->get('register_admin_created.subject'));
$this->assertSame("is - ...and she could take it away.\r\n[site:name], [site:url]", $config->get('register_admin_created.body'));
$this->assertSame("is - ...and it could be taken away.\r\n[site:name], [site:url]", $config->get('register_admin_created.body'));
$this->assertSame('is - Welcome!', $config->get('register_no_approval_required.subject'));
$this->assertSame('is - You can now log in if you can figure out how to use Drupal!', $config->get('register_no_approval_required.body'));
$this->assertSame('is - Soon...', $config->get('register_pending_approval.subject'));
......
......@@ -66,7 +66,7 @@ public function testContactLink() {
$this->drupalLogin($admin_account);
$this->drupalGet('test-contact-link');
// The admin user has access to all contact links beside his own.
// The admin user has access to all contact links beside their own.
$this->assertContactLinks($accounts, ['root', 'no_contact', 'contact']);
$this->drupalLogin($no_contact_account);
......
......@@ -297,7 +297,7 @@ function content_translation_entity_base_field_info(EntityTypeInterface $entity_
* - translatable: (optional) If the column group should be translatable by
* default, defaults to FALSE.
* - columns: (optional) A list of columns of this group. Defaults to the
* name of he group as the single column.
* name of the group as the single column.
* - require_all_groups_for_translation: (optional) Set to TRUE to enforce
* that making this column group translatable requires all others to be
* translatable too.
......
......@@ -62,7 +62,7 @@
this.textEditor = Drupal.editors[this.textFormat.editor];
// Store the actual value of this field. We'll need this to restore the
// original value when the user discards his modifications.
// original value when the user discards their modifications.
const $fieldItems = this.$el.find('.quickedit-field');
if ($fieldItems.length) {
this.$textElement = $fieldItems.eq(0);
......
......@@ -207,7 +207,7 @@ public function testLoading() {
]);
// The untrusted user tries to edit content that is written in a text format
// that (s)he is not allowed to use. The editor is still loaded. CKEditor,
// that they are not allowed to use. The editor is still loaded. CKEditor,
// for example, supports being loaded in a disabled state.
$this->drupalGet('node/1/edit');
list(, $editor_settings_present, $editor_js_present, $body, $format_selector) = $this->getThingsToCheck('body');
......
......@@ -131,7 +131,7 @@ public function testDefaultLangcode() {
// Check the default value of a language field when authors preferred option
// is selected.
// Create first an user and assign a preferred langcode to him.
// Create first an user and assign a preferred langcode.
$some_user = $this->drupalCreateUser();
$some_user->preferred_langcode = 'bb';
$some_user->save();
......
......@@ -52363,7 +52363,7 @@
))
->values(array(
'name' => 'user_mail_register_admin_created_body',
'value' => 's:30:"...and she could take it away.";',
'value' => 's:30:"...and it could be taken away.";',
))
->values(array(
'name' => 'user_mail_register_admin_created_subject',
......@@ -52650,7 +52650,7 @@
'realm' => 'language',
'realm_key' => 'is',
'name' => 'user_mail_register_admin_created_body',
'value' => "is - ...and she could take it away.\r\n[site:name], [site:url]",
'value' => "is - ...and it could be taken away.\r\n[site:name], [site:url]",
'serialized' => '0',
))
->values(array(
......@@ -174,8 +174,8 @@ function hook_node_access_records(\Drupal\node\NodeInterface $node) {
}
// For the example_author array, the GID is equivalent to a UID, which
// means there are many groups of just 1 user.
// Note that an author can always view his or her nodes, even if they
// have status unpublished.
// Note that an author can always view nodes they own, even if they have
// status unpublished.
if ($node->getOwnerId()) {
$grants[] = [
'realm' => 'example_author',
......
......@@ -1195,8 +1195,8 @@ function node_access_needs_rebuild($rebuild = NULL) {
* This rebuild is occasionally needed by modules that make system-wide changes
* to access levels. When the rebuild is required by an admin-triggered action
* (e.g module settings form), calling node_access_needs_rebuild(TRUE) instead
* of node_access_rebuild() lets the user perform his changes and actually
* rebuild only once he is done.
* of node_access_rebuild() lets the user perform changes and actually rebuild
* only once done.
*
* Note : As of Drupal 6, node access modules are not required to (and actually
* should not) call node_access_rebuild() in hook_install/uninstall anymore.
......
......@@ -219,7 +219,7 @@ public function testNodeTypeFieldUiPermissions() {
$admin_user_1 = $this->drupalCreateUser(['administer content types', 'administer node fields']);
$this->drupalLogin($admin_user_1);
// Test that the user only sees the actions available to him.
// Test that the user only sees the actions available to them.
$this->drupalGet('admin/structure/types');
$this->assertLinkByHref('admin/structure/types/manage/article/fields');
$this->assertNoLinkByHref('admin/structure/types/manage/article/display');
......@@ -228,7 +228,7 @@ public function testNodeTypeFieldUiPermissions() {
$admin_user_2 = $this->drupalCreateUser(['administer content types', 'administer node display']);
$this->drupalLogin($admin_user_2);
// Test that the user only sees the actions available to him.
// Test that the user only sees the actions available to them.
$this->drupalGet('admin/structure/types');
$this->assertNoLinkByHref('admin/structure/types/manage/article/fields');
$this->assertLinkByHref('admin/structure/types/manage/article/display');
......
......@@ -61,7 +61,7 @@ public function testStatusExtra() {
$this->assertText($node_unpublished2->label());
$this->assertText($node_unpublished3->label());
// The node author should see the published node and his own node.
// The node author should see the published node and their own node.
$this->drupalLogin($node_author);
$this->drupalGet('test_status_extra');
$this->assertText($node_published->label());
......@@ -77,7 +77,7 @@ public function testStatusExtra() {
$this->assertNoText($node_unpublished2->label());
$this->assertNoText($node_unpublished3->label());
// The author without the permission to see his own unpublished node should
// The author without the permission to see their own unpublished node should
// just see the published node.
$this->drupalLogin($node_author_not_unpublished);
$this->drupalGet('test_status_extra');
......
......@@ -316,7 +316,7 @@
// - Trigger: in-place editor.
// - Guarantees: see 'candidate' and 'active'.
// - Expected behavior: remain in 'invalid' state, let the user make more
// changes so that he can save it again, without validation errors.
// changes and then save it again, without validation errors.
'invalid',
],
......
......@@ -366,7 +366,7 @@
},
/**
* Asks the user to confirm whether he wants to stop editing via a modal.
* Asks the user if they want to stop editing via a modal.
*
* @param {Drupal.quickedit.EntityModel} entityModel
* An instance of the EntityModel class.
......
......@@ -124,7 +124,7 @@
break;
case 'activating': {
// The user has indicated he wants to do in-place editing: if
// The user is in the process of activating in-place editing: if
// something needs to be loaded (CSS/JavaScript/server data/…), then
// do so at this stage, and once the in-place editor is ready,
// set the 'active' state. A "loading" indicator will be shown in the
......@@ -149,11 +149,10 @@
break;
case 'saving':
// When the user has indicated he wants to save his changes to this
// field, this state will be entered. If the previous saving attempt
// resulted in validation errors, the previous state will be
// 'invalid'. Clean up those validation errors while the user is
// saving.
// When the user has triggered a save to this field, this state will
// be entered. If the previous saving attempt resulted in validation
// errors, the previous state will be 'invalid'. Clean up those
// validation errors while the user is saving.
if (from === 'invalid') {
this.removeValidationErrors();
}
......
......@@ -234,7 +234,7 @@ public function setUp() {
$this->entity = $reloaded_entity;
// Set a default value on the fields.
$this->entity->set('field_rest_test', ['value' => 'All the faith he had had had had no effect on the outcome of his life.']);
$this->entity->set('field_rest_test', ['value' => 'All the faith they had had had had no effect on the outcome of their life.']);
$this->entity->set('field_rest_test_multivalue', [['value' => 'One'], ['value' => 'Two']]);
$this->entity->set('rest_test_validation', ['value' => 'allowed value']);
$this->entity->save();
......@@ -1241,7 +1241,7 @@ public function testPatch() {
// Ensure that fields do not get deleted if they're not present in the PATCH
// request. Test this using the configurable field that we added, but which
// is not sent in the PATCH request.
$this->assertSame('All the faith he had had had had no effect on the outcome of his life.', $updated_entity->get('field_rest_test')->value);
$this->assertSame('All the faith they had had had had no effect on the outcome of their life.', $updated_entity->get('field_rest_test')->value);
// Multi-value field: remove item 0. Then item 1 becomes item 0.
$normalization_multi_value_tests = $this->getNormalizedPatchEntity();
......
......@@ -32,7 +32,7 @@ public function testMigration() {
$this->assertIdentical('So long, bub', $config->get('cancel_confirm.subject'));
$this->assertIdentical('The gates of Drupal are closed to you. Now you will work in the salt mines.', $config->get('cancel_confirm.body'));
$this->assertIdentical('Gawd made you an account', $config->get('register_admin_created.subject'));
$this->assertIdentical('...and she could take it away.', $config->get('register_admin_created.body'));
$this->assertIdentical('...and it could be taken away.', $config->get('register_admin_created.body'));
$this->assertIdentical('Welcome!', $config->get('register_no_approval_required.subject'));
$this->assertIdentical('You can now log in if you can figure out how to use Drupal!', $config->get('register_no_approval_required.body'));
$this->assertIdentical('Soon...', $config->get('register_pending_approval.subject'));
......
......@@ -103,8 +103,8 @@ public function formatMessages(array $messages) {
* The 'ok' status should be used to provide information about things
* that are acceptable. In general analysis isn't interested in 'ok'
* messages, but instead the 'warning', which is a category for items
* that may be broken unless the user knows what he or she is doing,
* and 'error' for items that are definitely broken are much more useful.
* that may be broken unless the user knows what they are doing, and 'error'
* for items that are definitely broken are much more useful.
*
* @param string $message
* @param string $type
......
......@@ -447,7 +447,7 @@ public function testFilterStringNotStarts() {
[
'name' => 'Paul',
],
// There is no Meredith returned because his description is empty
// There is no Meredith returned because their description is empty
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
......@@ -475,7 +475,7 @@ public function testFilterStringGroupedExposedNotStarts() {
[
'name' => 'Paul',
],
// There is no Meredith returned because his description is empty
// There is no Meredith returned because their description is empty
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
......@@ -556,7 +556,7 @@ public function testFilterStringNotEnds() {
[
'name' => 'Paul',
],
// There is no Meredith returned because his description is empty
// There is no Meredith returned because their description is empty
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
......@@ -581,7 +581,7 @@ public function testFilterStringGroupedExposedNotEnds() {
[
'name' => 'Paul',
],
// There is no Meredith returned because his description is empty
// There is no Meredith returned because their description is empty
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
......@@ -610,7 +610,7 @@ public function testFilterStringNot() {
[
'name' => 'Paul',
],
// There is no Meredith returned because his description is empty
// There is no Meredith returned because their description is empty
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
}
......@@ -635,7 +635,7 @@ public function testFilterStringGroupedExposedNot() {
[
'name' => 'Paul',
],
// There is no Meredith returned because his description is empty
// There is no Meredith returned because their description is empty
];
$this->assertIdenticalResultset($view, $resultset, $this->columnMap);
......
......@@ -489,7 +489,7 @@ function views_update_8500() {
}
// Beside of updating the field and plugin ID we also need to truncate orphan
// keys so he configuration applies to the config schema.
// keys so the configuration applies to the config schema.
// We cannot do that inline in the other code, due to caching issues with
// typed configuration.
foreach ($required_cleanup_handlers as $id => $paths_to_handlers) {
......
......@@ -402,7 +402,7 @@
});
// Add a mouseleave handler to close the dropdown when the user mouses
// away from the item. We use mouseleave instead of mouseout because
// the user is going to trigger mouseout when she moves from the trigger
// the user is going to trigger mouseout when moving away from the trigger
// link to the sub menu items.
// We use the live binder because the open class on this item will be
// toggled on and off and we want the handler to take effect in the cases
......
......@@ -316,9 +316,8 @@ function views_ui_views_analyze(ViewExecutable $view) {
if (count($view->displayHandlers) < 2) {
$ret[] = Analyzer::formatMessage(t('This view has only a default display and therefore will not be placed anywhere on your site; perhaps you want to add a page or a block display.'), 'warning');
}
// You can give a page display the same path as an alias existing in the
// system, so the alias will not work anymore. Report this to the user,
// because he probably wanted something else.
// If a display has a path, check that it does not match an existing path
// alias. This results in the path alias not working.
foreach ($view->displayHandlers as $display) {
if (empty($display)) {
continue;
......
......@@ -55,8 +55,8 @@ public function testBypassOwnWorkspace() {
$this->drupalLogin($lombardi);
$this->switchToWorkspace($bears);
// Because editor 2 has the bypass permission, he should be able to create
// and edit any node.
// Because editor 2 has the bypass permission, editor 2 should be able to
// create and edit any node.
$this->drupalGet('/node/' . $ditka_bears_node_id . '/edit');
$this->assertSession()->statusCodeEquals(403);
}
......
......@@ -76,6 +76,7 @@
<exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
</rule>
<rule ref="Drupal.Commenting.GenderNeutralComment" />
<rule ref="Drupal.Commenting.VariableComment">
<!-- Sniff for: DuplicateVar, EmptyVar, InlineVariableName -->
<exclude name="Drupal.Commenting.VariableComment.IncorrectVarType"/>
......
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