Issue #2921133 by quietone, VladimirAus, xjm, ankithashetty, longwave, Prem Suthar, smustgrave, benjifisher, AaronMcHale: Remove "Please" from the codebase
parent
1bb050cad7
commit
224c67343b
|
@ -1,3 +1,3 @@
|
|||
|
||||
Please read core/INSTALL.txt for detailed installation instructions for your
|
||||
Drupal website.
|
||||
Read core/INSTALL.txt for detailed installation instructions for your Drupal
|
||||
website.
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
],
|
||||
"flagWords": [
|
||||
"grey",
|
||||
"hte"
|
||||
"hte",
|
||||
"please"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
|
|
|
@ -34,6 +34,6 @@ following in your "Database file" field:
|
|||
sites/default/files/.ht.sqlite
|
||||
|
||||
Note: The .ht in the name will tell Apache to prevent the database from being
|
||||
downloaded. Please check that the file is, indeed, protected by your webserver.
|
||||
If not, please consult the documentation of your webserver on how to protect a
|
||||
file from downloading.
|
||||
downloaded. Check that the file is, indeed, protected by your webserver. If not,
|
||||
consult the documentation of your webserver on how to protect a file from
|
||||
downloading.
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
|
||||
Please read core/INSTALL.txt for detailed installation instructions for your
|
||||
Drupal website.
|
||||
Read core/INSTALL.txt for detailed installation instructions for your Drupal
|
||||
website.
|
||||
|
|
|
@ -260,7 +260,7 @@ function _drupal_log_error($error, $fatal = FALSE) {
|
|||
// We fallback to a maintenance page at this point, because the page generation
|
||||
// itself can generate errors.
|
||||
// Should not translate the string to avoid errors producing more errors.
|
||||
$message = 'The website encountered an unexpected error. Please try again later.' . '<br />' . $message;
|
||||
$message = 'The website encountered an unexpected error. Try again later.' . '<br />' . $message;
|
||||
|
||||
if ($is_installer) {
|
||||
// install_display_output() prints the output and ends script execution.
|
||||
|
|
|
@ -939,7 +939,7 @@ function batch_process($redirect = NULL, Url $url = NULL, $redirect_callback = N
|
|||
$query_options['op'] = 'finished';
|
||||
$error_url->setOption('query', $query_options);
|
||||
|
||||
$batch['error_message'] = t('Please continue to <a href=":error_url">the error page</a>', [':error_url' => $error_url->toString(TRUE)->getGeneratedUrl()]);
|
||||
$batch['error_message'] = t('Continue to <a href=":error_url">the error page</a>', [':error_url' => $error_url->toString(TRUE)->getGeneratedUrl()]);
|
||||
|
||||
// Clear the way for the redirection to the batch processing page, by
|
||||
// saving and unsetting the 'destination', if there is any.
|
||||
|
|
|
@ -363,7 +363,7 @@ class Datetime extends DateElementBase {
|
|||
// If there's empty input and the field is required, set an error. A
|
||||
// reminder of the required format in the message provides a good UX.
|
||||
elseif (empty($input['date']) && empty($input['time']) && $element['#required']) {
|
||||
$form_state->setError($element, t('The %field date is required. Please enter a date in the format %format.', ['%field' => $title, '%format' => static::formatExample($format)]));
|
||||
$form_state->setError($element, t('The %field date is required. Enter a date in the format %format.', ['%field' => $title, '%format' => static::formatExample($format)]));
|
||||
}
|
||||
else {
|
||||
// If the date is valid, set it.
|
||||
|
@ -374,7 +374,7 @@ class Datetime extends DateElementBase {
|
|||
// If the date is invalid, set an error. A reminder of the required
|
||||
// format in the message provides a good UX.
|
||||
else {
|
||||
$form_state->setError($element, t('The %field date is invalid. Please enter a date in the format %format.', ['%field' => $title, '%format' => static::formatExample($format)]));
|
||||
$form_state->setError($element, t('The %field date is invalid. Enter a date in the format %format.', ['%field' => $title, '%format' => static::formatExample($format)]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ class EarlyRenderingControllerWrapperSubscriber implements EventSubscriberInterf
|
|||
// is not permitted in that case. It is the developer's responsibility
|
||||
// to not use early rendering.
|
||||
elseif ($response instanceof AttachmentsInterface || $response instanceof CacheableResponseInterface || $response instanceof CacheableDependencyInterface) {
|
||||
throw new \LogicException(sprintf('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: %s.', get_class($response)));
|
||||
throw new \LogicException(sprintf('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Ensure you are not rendering content too early. Returned object class: %s.', get_class($response)));
|
||||
}
|
||||
else {
|
||||
// A Response or domain object is returned that does not care about
|
||||
|
|
|
@ -126,7 +126,7 @@ class FinalExceptionSubscriber implements EventSubscriberInterface {
|
|||
}
|
||||
|
||||
$content_type = $event->getRequest()->getRequestFormat() == 'html' ? 'text/html' : 'text/plain';
|
||||
$content = $this->t('The website encountered an unexpected error. Please try again later.');
|
||||
$content = $this->t('The website encountered an unexpected error. Try again later.');
|
||||
$content .= $message ? '<br><br>' . $message : '';
|
||||
$response = new Response($content, 500, ['Content-Type' => $content_type]);
|
||||
|
||||
|
|
|
@ -226,8 +226,8 @@ function hook_modules_installed($modules, $is_syncing) {
|
|||
* available when this hook is called. Use cases could be displaying a user
|
||||
* message, or calling a module function necessary for initial setup, etc.
|
||||
*
|
||||
* Please be sure that anything added or modified in this function that can
|
||||
* be removed during uninstall should be removed with hook_uninstall().
|
||||
* Ensure that anything added or modified in this function that can be removed
|
||||
* during uninstall should be removed with hook_uninstall().
|
||||
*
|
||||
* @param bool $is_syncing
|
||||
* TRUE if the module is being installed as part of a configuration import. In
|
||||
|
|
|
@ -94,7 +94,7 @@ class HtaccessWriter implements HtaccessWriterInterface {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
$this->logger->error("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: <pre><code>@htaccess</code></pre>", ['%directory' => $directory, '@htaccess' => FileSecurity::htaccessLines($deny_public_access)]);
|
||||
$this->logger->error("Security warning: Couldn't write .htaccess file. Create a .htaccess file in your %directory directory which contains the following lines: <pre><code>@htaccess</code></pre>", ['%directory' => $directory, '@htaccess' => FileSecurity::htaccessLines($deny_public_access)]);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class PathElement extends Textfield {
|
|||
/** @var \Drupal\Core\Url $url */
|
||||
if ($url = \Drupal::service('path.validator')->getUrlIfValid($element['#value'])) {
|
||||
if ($url->isExternal()) {
|
||||
$form_state->setError($element, t('You cannot use an external URL, please enter a relative path.'));
|
||||
$form_state->setError($element, t('You cannot use an external URL. Enter a relative path.'));
|
||||
return;
|
||||
}
|
||||
if ($element['#convert_path'] == self::CONVERT_NONE) {
|
||||
|
|
|
@ -1236,9 +1236,9 @@ function hook_page_bottom(array &$page_bottom) {
|
|||
* the standard preprocess functions to run. This can be used to give a
|
||||
* theme FULL control over how variables are set. For example, if a theme
|
||||
* wants total control over how certain variables in the page.html.twig are
|
||||
* set, this can be set to true. Please keep in mind that when this is used
|
||||
* by a theme, that theme becomes responsible for making sure necessary
|
||||
* variables are set.
|
||||
* set, this can be set to true. Keep in mind that when this is used by a
|
||||
* theme, that theme becomes responsible for making sure necessary variables
|
||||
* are set.
|
||||
* - type: (automatically derived) Where the theme hook is defined:
|
||||
* 'module', 'theme_engine', or 'theme'.
|
||||
* - theme path: The directory path of the theme or module. If not defined,
|
||||
|
|
|
@ -362,7 +362,7 @@
|
|||
* @prop {string} [progress.type='throbber']
|
||||
* Type of progress element, core provides `'bar'`, `'throbber'` and
|
||||
* `'fullscreen'`.
|
||||
* @prop {string} [progress.message=Drupal.t('Please wait...')]
|
||||
* @prop {string} [progress.message=Drupal.t('Processing...')]
|
||||
* Custom message to be used with the bar indicator.
|
||||
* @prop {object} [submit]
|
||||
* Extra data to be sent with the Ajax request.
|
||||
|
@ -407,7 +407,7 @@
|
|||
method: 'replaceWith',
|
||||
progress: {
|
||||
type: 'throbber',
|
||||
message: Drupal.t('Please wait...'),
|
||||
message: Drupal.t('Processing...'),
|
||||
},
|
||||
submit: {
|
||||
js: true,
|
||||
|
|
|
@ -486,13 +486,13 @@ window.Drupal = { behaviors: {}, locale: {} };
|
|||
* @param {number} count
|
||||
* The item count to display.
|
||||
* @param {string} singular
|
||||
* The string for the singular case. Please make sure it is clear this is
|
||||
* singular, to ease translation (e.g. use "1 new comment" instead of "1
|
||||
* new"). Do not use @count in the singular string.
|
||||
* The string for the singular case. Make sure it is clear this is singular,
|
||||
* to ease translation (e.g. use "1 new comment" instead of "1 new"). Do not
|
||||
* use @count in the singular string.
|
||||
* @param {string} plural
|
||||
* The string for the plural case. Please make sure it is clear this is
|
||||
* plural, to ease translation. Use @count in place of the item count, as in
|
||||
* "@count new comments".
|
||||
* The string for the plural case. Make sure it is clear this is plural, to
|
||||
* ease translation. Use @count in place of the item count, as in "@count
|
||||
* new comments".
|
||||
* @param {object} [args]
|
||||
* An object of replacements pairs to make after translation. Incidences
|
||||
* of any key in this array are replaced with the corresponding value.
|
||||
|
|
|
@ -180,7 +180,7 @@ class BasicAuthTest extends BrowserTestBase {
|
|||
$this->drupalGet($url);
|
||||
$this->assertSession()->statusCodeEquals(401);
|
||||
$this->assertSession()->pageTextNotContains('Exception');
|
||||
$this->assertSession()->pageTextContains('Please log in to access this page.');
|
||||
$this->assertSession()->pageTextContains('Log in to access this page.');
|
||||
|
||||
// Case when empty credentials are passed, a user friendly access denied
|
||||
// message is displayed.
|
||||
|
|
|
@ -207,7 +207,7 @@ class BigPipeTest extends BrowserTestBase {
|
|||
$this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save();
|
||||
$this->drupalGet(Url::fromRoute('big_pipe_test'));
|
||||
// The 'edge_case__html_exception' case throws an exception.
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Please try again later');
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Try again later');
|
||||
$this->assertSession()->pageTextContains('You are not allowed to say llamas are not cool!');
|
||||
// Check that stop signal and closing body tag are absent.
|
||||
$this->assertSession()->responseNotContains(BigPipe::STOP_SIGNAL);
|
||||
|
@ -279,7 +279,7 @@ class BigPipeTest extends BrowserTestBase {
|
|||
$this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save();
|
||||
$this->drupalGet(Url::fromRoute('big_pipe_test'));
|
||||
// The 'edge_case__html_exception' case throws an exception.
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Please try again later');
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Try again later');
|
||||
$this->assertSession()->pageTextContains('You are not allowed to say llamas are not cool!');
|
||||
$this->assertSession()->responseNotContains('</body>');
|
||||
// The exception is expected. Do not interpret it as a test failure.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -58,7 +58,7 @@ export default class DrupalMediaEditing extends Plugin {
|
|||
themeError ||
|
||||
`
|
||||
<p>${Drupal.t(
|
||||
'An error occurred while trying to preview the media. Please save your work and reload this page.',
|
||||
'An error occurred while trying to preview the media. Save your work and reload this page.',
|
||||
)}<p>
|
||||
`;
|
||||
|
||||
|
|
|
@ -415,7 +415,7 @@ class MediaTest extends WebDriverTestBase {
|
|||
$assert_session->waitForElementVisible('css', '.ck-widget.drupal-media');
|
||||
$this->assertEmpty($assert_session->waitForElementVisible('css', 'img[src*="image-test.png"]', 1000));
|
||||
$assert_session->elementNotExists('css', '.ck-widget.drupal-media .media');
|
||||
$this->assertNotEmpty($assert_session->waitForText('An error occurred while trying to preview the media. Please save your work and reload this page.'));
|
||||
$this->assertNotEmpty($assert_session->waitForText('An error occurred while trying to preview the media. Save your work and reload this page.'));
|
||||
// Now assert that the error doesn't appear when the override to force an
|
||||
// error is removed.
|
||||
$this->container->get('state')->set('test_media_filter_controller_throw_error', FALSE);
|
||||
|
|
|
@ -86,7 +86,7 @@ class ModerationLocaleTest extends ModerationStateTestBase {
|
|||
];
|
||||
$this->submitForm($edit, 'Save (this translation)');
|
||||
// Here the error has occurred "The website encountered an unexpected error.
|
||||
// Please try again later."
|
||||
// Try again later."
|
||||
// If the translation has got lost.
|
||||
$this->assertSession()->pageTextContains('Article French node Draft has been updated.');
|
||||
|
||||
|
|
|
@ -258,8 +258,8 @@ class ContentTranslationSettingsTest extends BrowserTestBase {
|
|||
|
||||
// Make sure account settings can be saved.
|
||||
$this->drupalGet('admin/config/people/accounts');
|
||||
$this->submitForm(['anonymous' => 'Save me please!'], 'Save configuration');
|
||||
$this->assertSession()->fieldValueEquals('anonymous', 'Save me please!');
|
||||
$this->submitForm(['anonymous' => 'Save me!'], 'Save configuration');
|
||||
$this->assertSession()->fieldValueEquals('anonymous', 'Save me!');
|
||||
$this->assertSession()->statusMessageContains('The configuration options have been saved.', 'status');
|
||||
}
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ class DateTimeFieldTest extends DateTestBase {
|
|||
\Drupal::formBuilder()->submitForm($form, $form_state);
|
||||
$errors = $form_state->getErrors();
|
||||
$arguments = $errors["{$field_name}][0][value"]->getArguments();
|
||||
$expected_error_message = new FormattableMarkup('The %field date is required. Please enter a date in the format %format.', ['%field' => $field_label, '%format' => $arguments['%format']]);
|
||||
$expected_error_message = new FormattableMarkup('The %field date is required. Enter a date in the format %format.', ['%field' => $field_label, '%format' => $arguments['%format']]);
|
||||
$actual_error_message = $errors["{$field_name}][0][value"]->__toString();
|
||||
$this->assertEquals($expected_error_message->__toString(), $actual_error_message);
|
||||
// Verify the format value is in the "YYYY-MM-DD HH:MM:SS" format.
|
||||
|
|
|
@ -77,10 +77,10 @@ function hook_file_validate(\Drupal\file\FileInterface $file) {
|
|||
$errors = [];
|
||||
|
||||
if (!$file->getFilename()) {
|
||||
$errors[] = t("The file's name is empty. Please give a name to the file.");
|
||||
$errors[] = t("The file's name is empty. Give a name to the file.");
|
||||
}
|
||||
if (strlen($file->getFilename()) > 255) {
|
||||
$errors[] = t("The file's name exceeds the 255 characters limit. Please rename the file and try again.");
|
||||
$errors[] = t("The file's name exceeds the 255 characters limit. Rename the file and try again.");
|
||||
}
|
||||
|
||||
return $errors;
|
||||
|
|
|
@ -127,10 +127,10 @@ function file_validate_name_length(FileInterface $file) {
|
|||
$errors = [];
|
||||
|
||||
if (!$file->getFilename()) {
|
||||
$errors[] = t("The file's name is empty. Please give a name to the file.");
|
||||
$errors[] = t("The file's name is empty. Enter a name for the file.");
|
||||
}
|
||||
if (strlen($file->getFilename()) > 240) {
|
||||
$errors[] = t("The file's name exceeds the 240 characters limit. Please rename the file and try again.");
|
||||
$errors[] = t("The file's name exceeds the 240 characters limit. Rename the file and try again.");
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@ class FileNameLengthConstraint extends Constraint {
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $messageEmpty = "The file's name is empty. Please give a name to the file.";
|
||||
public string $messageEmpty = "The file's name is empty. Enter a name for the file.";
|
||||
|
||||
/**
|
||||
* The message when file name is too long.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $messageTooLong = "The file's name exceeds the %maxLength characters limit. Please rename the file and try again.";
|
||||
public string $messageTooLong = "The file's name exceeds the %maxLength characters limit. Rename the file and try again.";
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class FileModuleTestForm extends FormBase {
|
|||
'#type' => 'managed_file',
|
||||
'#title' => $this->t('Managed <em>@type</em>', ['@type' => 'file & butter']),
|
||||
'#upload_location' => 'public://test',
|
||||
'#progress_message' => $this->t('Please wait...'),
|
||||
'#progress_message' => $this->t('Processing...'),
|
||||
'#extended' => (bool) $extended,
|
||||
'#size' => 13,
|
||||
'#multiple' => (bool) $multiple,
|
||||
|
|
|
@ -53,8 +53,8 @@ class FileValidatorTest extends FileValidatorTestBase {
|
|||
$this->file->set('filename', $this->randomMachineName(241));
|
||||
$violations = $this->validator->validate($this->file, $validators);
|
||||
$this->assertCount(2, $violations);
|
||||
$this->assertEquals("The file's name exceeds the 240 characters limit. Please rename the file and try again.", $violations[0]->getMessage());
|
||||
$this->assertEquals("The file's name exceeds the 240 characters limit. Please rename the file and try again.", $violations[1]->getMessage());
|
||||
$this->assertEquals("The file's name exceeds the 240 characters limit. Rename the file and try again.", $violations[0]->getMessage());
|
||||
$this->assertEquals("The file's name exceeds the 240 characters limit. Rename the file and try again.", $violations[1]->getMessage());
|
||||
$this->assertCount(1, file_test_get_calls('validate'));
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ class ForumUninstallTest extends BrowserTestBase {
|
|||
|
||||
// Now attempt to uninstall forum.
|
||||
$this->drupalGet('admin/modules/uninstall');
|
||||
$this->assertSession()->responseNotContains('The website encountered an unexpected error. Please try again later');
|
||||
$this->assertSession()->responseNotContains('The website encountered an unexpected error. Try again later');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
||||
// Assert forum is no longer required.
|
||||
|
|
|
@ -114,7 +114,7 @@ class ResourceResponseValidator implements EventSubscriberInterface {
|
|||
* @see self::validateResponse
|
||||
*/
|
||||
public function doValidateResponse(Response $response, Request $request) {
|
||||
assert($this->validateResponse($response, $request), 'A JSON:API response failed validation (see the logs for details). Please report this in the issue queue on drupal.org');
|
||||
assert($this->validateResponse($response, $request), 'A JSON:API response failed validation (see the logs for details). Report this in the issue queue on drupal.org');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -290,7 +290,7 @@ class ResourceTypeRepository implements ResourceTypeRepositoryInterface {
|
|||
/** @var \Drupal\jsonapi\ResourceType\ResourceTypeField $field */
|
||||
foreach (array_diff_key($fields, array_flip([$reserved_field_name])) as $field) {
|
||||
if ($aliased_reserved_field->getPublicName() === $field->getPublicName()) {
|
||||
throw new \LogicException("The generated alias '{$aliased_reserved_field->getPublicName()}' for field name '{$aliased_reserved_field->getInternalName()}' conflicts with an existing field. Please report this in the JSON:API issue queue!");
|
||||
throw new \LogicException("The generated alias '{$aliased_reserved_field->getPublicName()}' for field name '{$aliased_reserved_field->getInternalName()}' conflicts with an existing field. Report this in the JSON:API issue queue!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ class ResourceTypeRepository implements ResourceTypeRepositoryInterface {
|
|||
if (!InstallerKernel::installationAttempted()) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
'The "%s" at "%s:%s" references the "%s:%s" entity type that does not exist. Please take action.',
|
||||
'The "%s" at "%s:%s" references the "%s:%s" entity type that does not exist.',
|
||||
$field_definition->getName(),
|
||||
$field_definition->getTargetEntityTypeId(),
|
||||
$field_definition->getTargetBundle(),
|
||||
|
|
|
@ -205,7 +205,7 @@ class RelatedResourceTypesTest extends JsonapiKernelTestBase {
|
|||
}
|
||||
catch (Warning $e) {
|
||||
static::assertSame(
|
||||
'The "field_ref_with_missing_bundle" at "node:foo" references the "node:missing_bundle" entity type that does not exist. Please take action.',
|
||||
'The "field_ref_with_missing_bundle" at "node:foo" references the "node:missing_bundle" entity type that does not exist.',
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ class ResourceTypeRepositoryTest extends JsonapiKernelTestBase {
|
|||
$reflection_method = $reflection_class->getMethod('getFields');
|
||||
|
||||
$this->expectException(\LogicException::class);
|
||||
$this->expectExceptionMessage("The generated alias '{$field_name_list[1]}' for field name '{$field_name_list[0]}' conflicts with an existing field. Please report this in the JSON:API issue queue!");
|
||||
$this->expectExceptionMessage("The generated alias '{$field_name_list[1]}' for field name '{$field_name_list[0]}' conflicts with an existing field. Report this in the JSON:API issue queue!");
|
||||
$reflection_method->invokeArgs($this->resourceTypeRepository, [$field_name_list, $entity_type, $bundle]);
|
||||
}
|
||||
|
||||
|
|
|
@ -192,14 +192,14 @@ class LocaleTranslationUiTest extends BrowserTestBase {
|
|||
$textarea = $this->assertSession()->elementExists('xpath', '//textarea');
|
||||
$lid = $textarea->getAttribute('name');
|
||||
$edit = [
|
||||
$lid => 'Please enter your Llama username.',
|
||||
$lid => 'Enter your Llama username.',
|
||||
];
|
||||
$this->drupalGet('admin/config/regional/translate');
|
||||
$this->submitForm($edit, 'Save translations');
|
||||
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet('xx/user/login');
|
||||
$this->assertSession()->pageTextContains('Please enter your Llama username.');
|
||||
$this->assertSession()->pageTextContains('Enter your Llama username.');
|
||||
|
||||
// Delete the language.
|
||||
$this->drupalLogin($admin_user);
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
*/
|
||||
Drupal.theme.mediaEmbedPreviewError = () =>
|
||||
`<div>${Drupal.t(
|
||||
'An error occurred while trying to preview the media. Please save your work and reload this page.',
|
||||
'An error occurred while trying to preview the media. Save your work and reload this page.',
|
||||
)}</div>`;
|
||||
})(Drupal);
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
dialogType: 'ajax',
|
||||
progress: {
|
||||
type: 'fullscreen',
|
||||
message: Drupal.t('Please wait...'),
|
||||
message: Drupal.t('Processing...'),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -193,7 +193,7 @@
|
|||
dialogType: 'ajax',
|
||||
progress: {
|
||||
type: 'fullscreen',
|
||||
message: loadingAnnouncement || Drupal.t('Please wait...'),
|
||||
message: loadingAnnouncement || Drupal.t('Processing...'),
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -710,7 +710,7 @@ abstract class AddFormBase extends FormBase implements BaseFormIdInterface, Trus
|
|||
$response->addCommand(new InvokeCommand("#media-library-content [value=$media_id_to_focus]", 'focus'));
|
||||
$available_slots = $this->getMediaLibraryState($form_state)->getAvailableSlots();
|
||||
if ($available_slots > 0 && $selected_count > $available_slots) {
|
||||
$warning = $this->formatPlural($selected_count - $available_slots, 'There are currently @total items selected. The maximum number of items for the field is @max. Please remove @count item from the selection.', 'There are currently @total items selected. The maximum number of items for the field is @max. Please remove @count items from the selection.', [
|
||||
$warning = $this->formatPlural($selected_count - $available_slots, 'There are currently @total items selected. The maximum number of items for the field is @max. Remove @count item from the selection.', 'There are currently @total items selected. The maximum number of items for the field is @max. Remove @count items from the selection.', [
|
||||
'@total' => $selected_count,
|
||||
'@max' => $available_slots,
|
||||
]);
|
||||
|
|
|
@ -632,7 +632,7 @@ class MediaLibraryWidget extends WidgetBase implements TrustedCallbackInterface
|
|||
protected function getNoMediaTypesAvailableMessage() {
|
||||
$entity_type_id = $this->fieldDefinition->getTargetEntityTypeId();
|
||||
|
||||
$default_message = $this->t('There are no allowed media types configured for this field. Please contact the site administrator.');
|
||||
$default_message = $this->t('There are no allowed media types configured for this field. Contact the site administrator.');
|
||||
|
||||
// Show the default message if the user does not have the permissions to
|
||||
// configure the fields for the entity type.
|
||||
|
|
|
@ -140,7 +140,7 @@ class MediaLibrarySelectForm extends FieldPluginBase {
|
|||
$selected_count = count(explode(',', $current_selection));
|
||||
if ($available_slots > 0 && $selected_count > $available_slots) {
|
||||
$response = new AjaxResponse();
|
||||
$error = \Drupal::translation()->formatPlural($selected_count - $available_slots, 'There are currently @total items selected. The maximum number of items for the field is @max. Please remove @count item from the selection.', 'There are currently @total items selected. The maximum number of items for the field is @max. Please remove @count items from the selection.', [
|
||||
$error = \Drupal::translation()->formatPlural($selected_count - $available_slots, 'There are currently @total items selected. The maximum number of items for the field is @max. Remove @count item from the selection.', 'There are currently @total items selected. The maximum number of items for the field is @max. Remove @count items from the selection.', [
|
||||
'@total' => $selected_count,
|
||||
'@max' => $available_slots,
|
||||
]);
|
||||
|
|
|
@ -116,11 +116,11 @@ class WidgetOverflowTest extends MediaLibraryTestBase {
|
|||
else {
|
||||
$this->pressSaveButton();
|
||||
}
|
||||
$this->waitForElementTextContains('.messages--warning', 'There are currently 5 items selected. The maximum number of items for the field is 2. Please remove 3 items from the selection.');
|
||||
$this->waitForElementTextContains('.messages--warning', 'There are currently 5 items selected. The maximum number of items for the field is 2. Remove 3 items from the selection.');
|
||||
// If the user tries to insert the selected items anyway, they should get
|
||||
// an error.
|
||||
$this->pressInsertSelected(NULL, FALSE);
|
||||
$this->waitForElementTextContains('.messages--error', 'There are currently 5 items selected. The maximum number of items for the field is 2. Please remove 3 items from the selection.');
|
||||
$this->waitForElementTextContains('.messages--error', 'There are currently 5 items selected. The maximum number of items for the field is 2. Remove 3 items from the selection.');
|
||||
$assert_session->elementNotExists('css', '.messages--warning');
|
||||
// Once the extra items are deselected, all should be well.
|
||||
$this->deselectMediaItem(2);
|
||||
|
|
|
@ -37,7 +37,7 @@ class WidgetWithoutTypesTest extends MediaLibraryTestBase {
|
|||
]);
|
||||
$this->drupalLogin($user);
|
||||
|
||||
$default_message = 'There are no allowed media types configured for this field. Please contact the site administrator.';
|
||||
$default_message = 'There are no allowed media types configured for this field. Contact the site administrator.';
|
||||
|
||||
$this->drupalGet('node/add/basic_page');
|
||||
|
||||
|
@ -134,7 +134,7 @@ class WidgetWithoutTypesTest extends MediaLibraryTestBase {
|
|||
// Visit a node create page.
|
||||
$this->drupalGet('node/add/basic_page');
|
||||
|
||||
$field_ui_uninstalled_message = 'There are no allowed media types configured for this field. Please contact the site administrator.';
|
||||
$field_ui_uninstalled_message = 'There are no allowed media types configured for this field. Contact the site administrator.';
|
||||
|
||||
// Assert the link is now longer part of the message.
|
||||
$assert_session->elementNotExists('named', ['link', 'Edit the field settings']);
|
||||
|
|
|
@ -220,7 +220,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter
|
|||
// Node search is executable if we have keywords or an advanced parameter.
|
||||
// At least, we should parse out the parameters and see if there are any
|
||||
// keyword matches in that case, rather than just printing out the
|
||||
// "Please enter keywords" message.
|
||||
// "Enter keywords" message.
|
||||
return !empty($this->keywords) || (isset($this->searchParameters['f']) && count($this->searchParameters['f']));
|
||||
}
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@ abstract class ListItemBase extends FieldItemBase implements OptionsProviderInte
|
|||
$values = [];
|
||||
|
||||
if (is_string($list)) {
|
||||
trigger_error('Passing a string to ' . __METHOD__ . '() is deprecated in drupal:10.2.0 and will be removed from drupal:11.0.0. Please use an array instead.', E_USER_DEPRECATED);
|
||||
trigger_error('Passing a string to ' . __METHOD__ . '() is deprecated in drupal:10.2.0 and will be removed from drupal:11.0.0. Use an array instead.', E_USER_DEPRECATED);
|
||||
$list = explode("\n", $list);
|
||||
$list = array_map('trim', $list);
|
||||
$list = array_filter($list, 'strlen');
|
||||
|
|
|
@ -71,7 +71,7 @@ function options_test_form_entity_test_entity_test_form_alter(&$form, FormStateI
|
|||
function options_test_options_list_alter(array &$options, array $context) {
|
||||
if ($context['fieldDefinition']->getName() === 'card_4' && $context['widget']->getPluginId() === 'options_select') {
|
||||
// Rename _none option.
|
||||
$options['_none'] = '- Please select something -';
|
||||
$options['_none'] = '- Select something -';
|
||||
}
|
||||
|
||||
if ($context['fieldDefinition']->getName() === 'card_4' && $context['entity']->bundle() === 'entity_test') {
|
||||
|
|
|
@ -141,7 +141,7 @@ class OptionsFieldUITest extends FieldTestBase {
|
|||
$node->delete();
|
||||
$this->drupalGet($this->adminPath);
|
||||
$delete_button_1->click();
|
||||
$assert_session->pageTextNotContains('Please wait');
|
||||
$assert_session->pageTextNotContains('Processing...');
|
||||
$page->findById('edit-submit')->click();
|
||||
$field_storage = FieldStorageConfig::loadByName('node', $this->fieldName);
|
||||
$this->assertSame($field_storage->getSetting('allowed_values'), [0 => 'Zero']);
|
||||
|
@ -221,7 +221,7 @@ class OptionsFieldUITest extends FieldTestBase {
|
|||
$node->delete();
|
||||
$this->drupalGet($this->adminPath);
|
||||
$delete_button_1->click();
|
||||
$assert_session->pageTextNotContains('Please wait');
|
||||
$assert_session->pageTextNotContains('Processing...');
|
||||
$page->findById('edit-submit')->click();
|
||||
$field_storage = FieldStorageConfig::loadByName('node', $this->fieldName);
|
||||
$this->assertSame($field_storage->getSetting('allowed_values'), [0 => 'Zero', 2 => 'Two']);
|
||||
|
@ -301,7 +301,7 @@ class OptionsFieldUITest extends FieldTestBase {
|
|||
$node->delete();
|
||||
$this->drupalGet($this->adminPath);
|
||||
$delete_button_1->click();
|
||||
$assert_session->pageTextNotContains('Please wait');
|
||||
$assert_session->pageTextNotContains('Processing...');
|
||||
$page->findById('edit-submit')->click();
|
||||
$field_storage = FieldStorageConfig::loadByName('node', $this->fieldName);
|
||||
$this->assertSame($field_storage->getSetting('allowed_values'), ['zero' => 'Zero']);
|
||||
|
|
|
@ -692,7 +692,7 @@ class OptionsWidgetsTest extends FieldTestBase {
|
|||
$xpath = '//select[@id=:id]//option[@value="_none" and text()=:label]';
|
||||
$xpath_args = [':id' => 'edit-card-1', ':label' => '- None -'];
|
||||
$this->assertSession()->elementExists('xpath', $this->assertSession()->buildXPathQuery($xpath, $xpath_args));
|
||||
$xpath_args = [':id' => 'edit-card-4', ':label' => '- Please select something -'];
|
||||
$xpath_args = [':id' => 'edit-card-4', ':label' => '- Select something -'];
|
||||
$this->assertSession()->elementExists('xpath', $this->assertSession()->buildXPathQuery($xpath, $xpath_args));
|
||||
|
||||
// Display form: check that options are displayed correctly.
|
||||
|
|
|
@ -155,7 +155,7 @@ final class ComponentNodeVisitor implements NodeVisitorInterface {
|
|||
$error_messages = [];
|
||||
if (!empty($undocumented_ids)) {
|
||||
$error_messages[] = sprintf(
|
||||
'We found an unexpected slot that is not declared: [%s]. Please declare them in "%s.component.yml".',
|
||||
'We found an unexpected slot that is not declared: [%s]. Declare them in "%s.component.yml".',
|
||||
implode(', ', $undocumented_ids),
|
||||
$component->machineName
|
||||
);
|
||||
|
|
|
@ -108,7 +108,7 @@ final class ComponentRenderTest extends ComponentKernelTestBase {
|
|||
'#component' => 'sdc_test:my-banner',
|
||||
'#props' => [
|
||||
'heading' => $this->t('I am a banner'),
|
||||
'ctaText' => $this->t('Click me, please'),
|
||||
'ctaText' => $this->t('Click me'),
|
||||
'ctaHref' => 'https://www.example.org',
|
||||
'ctaTarget' => '',
|
||||
],
|
||||
|
@ -260,7 +260,7 @@ final class ComponentRenderTest extends ComponentKernelTestBase {
|
|||
'#component' => 'sdc_test:my-banner',
|
||||
'#props' => [
|
||||
'heading' => $this->t('I am a banner'),
|
||||
'ctaText' => $this->t('Click me, please'),
|
||||
'ctaText' => $this->t('Click me'),
|
||||
'ctaHref' => 'https://www.example.org',
|
||||
'ctaTarget' => '',
|
||||
],
|
||||
|
@ -292,7 +292,7 @@ final class ComponentRenderTest extends ComponentKernelTestBase {
|
|||
'#component' => 'sdc_test:my-banner',
|
||||
'#props' => [
|
||||
'heading' => $this->t('I am a banner'),
|
||||
'ctaText' => $this->t('Click me, please'),
|
||||
'ctaText' => $this->t('Click me'),
|
||||
'ctaHref' => 'https://www.example.org',
|
||||
'ctaTarget' => '',
|
||||
],
|
||||
|
|
|
@ -104,7 +104,7 @@ class SearchController extends ControllerBase {
|
|||
else {
|
||||
// The search not being executable means that no keywords or other
|
||||
// conditions were entered.
|
||||
$this->messenger()->addError($this->t('Please enter some keywords.'));
|
||||
$this->messenger()->addError($this->t('Enter some keywords.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ class SearchBlockTest extends BrowserTestBase {
|
|||
$this->drupalGet('');
|
||||
$this->submitForm($terms, 'Search');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
$this->assertSession()->statusMessageContains('Please enter some keywords', 'error');
|
||||
$this->assertSession()->statusMessageContains('Enter some keywords', 'error');
|
||||
|
||||
// Confirm that the user is redirected to the search page, when form is
|
||||
// submitted empty.
|
||||
|
@ -117,7 +117,7 @@ class SearchBlockTest extends BrowserTestBase {
|
|||
$this->drupalGet('node');
|
||||
$this->submitForm(['keys' => $this->randomMachineName(1)], 'Search');
|
||||
$this->assertSession()->statusMessageContains('You must include at least one keyword to match in the content', 'warning');
|
||||
$this->assertSession()->statusMessageNotContains('Please enter some keywords');
|
||||
$this->assertSession()->statusMessageNotContains('Enter some keywords');
|
||||
$this->submitForm(['keys' => $this->randomMachineName()], 'Search', 'search-block-form');
|
||||
$this->assertSession()->statusMessageNotContains('You must include at least one keyword to match in the content');
|
||||
|
||||
|
|
|
@ -138,26 +138,26 @@ class SearchPageTextTest extends BrowserTestBase {
|
|||
$this->assertSession()->statusMessageContains("Your search used too many AND/OR expressions. Only the first {$limit} terms were included in this search.", 'warning');
|
||||
|
||||
// Test that a search on Node or User with no keywords entered generates
|
||||
// the "Please enter some keywords" message.
|
||||
// the "Enter some keywords" message.
|
||||
$this->drupalGet('search/node');
|
||||
$this->submitForm([], 'Search');
|
||||
$this->assertSession()->statusMessageContains('Please enter some keywords', 'error');
|
||||
$this->assertSession()->statusMessageContains('Enter some keywords', 'error');
|
||||
$this->drupalGet('search/user');
|
||||
$this->submitForm([], 'Search');
|
||||
$this->assertSession()->statusMessageContains('Please enter some keywords', 'error');
|
||||
$this->assertSession()->statusMessageContains('Enter some keywords', 'error');
|
||||
|
||||
// Make sure the "Please enter some keywords" message is NOT displayed if
|
||||
// you use "or" words or phrases in Advanced Search.
|
||||
// Make sure the "Enter some keywords" message is NOT displayed if you use
|
||||
// "or" words or phrases in Advanced Search.
|
||||
$this->drupalGet('search/node');
|
||||
$this->submitForm([
|
||||
'or' => $this->randomMachineName() . ' ' . $this->randomMachineName(),
|
||||
], 'edit-submit--2');
|
||||
$this->assertSession()->statusMessageNotContains('Please enter some keywords');
|
||||
$this->assertSession()->statusMessageNotContains('Enter some keywords');
|
||||
$this->drupalGet('search/node');
|
||||
$this->submitForm([
|
||||
'phrase' => '"' . $this->randomMachineName() . '" "' . $this->randomMachineName() . '"',
|
||||
], 'edit-submit--2');
|
||||
$this->assertSession()->statusMessageNotContains('Please enter some keywords');
|
||||
$this->assertSession()->statusMessageNotContains('Enter some keywords');
|
||||
|
||||
// Verify that if you search for a too-short keyword, you get the right
|
||||
// message, and that if after that you search for a longer keyword, you
|
||||
|
@ -165,7 +165,7 @@ class SearchPageTextTest extends BrowserTestBase {
|
|||
$this->drupalGet('search/node');
|
||||
$this->submitForm(['keys' => $this->randomMachineName(1)], 'Search');
|
||||
$this->assertSession()->statusMessageContains('You must include at least one keyword', 'warning');
|
||||
$this->assertSession()->statusMessageNotContains('Please enter some keywords');
|
||||
$this->assertSession()->statusMessageNotContains('Enter some keywords');
|
||||
$this->submitForm(['keys' => $this->randomMachineName()], 'Search');
|
||||
$this->assertSession()->statusMessageNotContains('You must include at least one keyword');
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class ValidationErrorBlock extends BlockBase {
|
|||
*/
|
||||
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
|
||||
parent::validateConfigurationForm($form, $form_state);
|
||||
$form_state->setError($form['label'], 'Sorry system error. Please save again.');
|
||||
$form_state->setError($form['label'], 'Sorry system error. Save again.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ class SettingsTrayBlockFormTest extends SettingsTrayTestBase {
|
|||
$web_assert->assertWaitOnAjaxRequest();
|
||||
// The settings_tray_test_validation test plugin form always has a
|
||||
// validation error.
|
||||
$web_assert->elementContains('css', '#drupal-off-canvas', 'Sorry system error. Please save again');
|
||||
$web_assert->elementContains('css', '#drupal-off-canvas', 'Sorry system error. Save again');
|
||||
$this->disableEditMode();
|
||||
$block->delete();
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class Http4xxController extends ControllerBase {
|
|||
*/
|
||||
public function on401() {
|
||||
return [
|
||||
'#markup' => $this->t('Please log in to access this page.'),
|
||||
'#markup' => $this->t('Log in to access this page.'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ class ThemeController extends ControllerBase {
|
|||
$admin_theme = $config->get('admin');
|
||||
if (!empty($admin_theme) && $admin_theme != $theme) {
|
||||
$this->messenger()
|
||||
->addStatus($this->t('Please note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', [
|
||||
->addStatus($this->t('Note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', [
|
||||
'%admin_theme' => $themes[$admin_theme]->info['name'],
|
||||
'%selected_theme' => $themes[$theme]->info['name'],
|
||||
]));
|
||||
|
|
|
@ -143,7 +143,7 @@ class ModulesUninstallConfirmForm extends ConfirmFormBase {
|
|||
|
||||
// Prevent this page from showing when the module list is empty.
|
||||
if (empty($this->modules)) {
|
||||
$this->messenger()->addError($this->t('The selected modules could not be uninstalled, either due to a website problem or due to the uninstall confirmation form timing out. Please try again.'));
|
||||
$this->messenger()->addError($this->t('The selected modules could not be uninstalled, either due to a website problem or due to the uninstall confirmation form timing out.'));
|
||||
return $this->redirect('system.modules_uninstall');
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ class ThemeExperimentalConfirmForm extends ConfirmFormBase {
|
|||
$admin_theme = $config->get('admin');
|
||||
if (!empty($admin_theme) && $admin_theme !== $theme) {
|
||||
$this->messenger()
|
||||
->addStatus($this->t('Please note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', [
|
||||
->addStatus($this->t('Note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', [
|
||||
'%admin_theme' => $themes[$admin_theme]->info['name'],
|
||||
'%selected_theme' => $themes[$theme]->info['name'],
|
||||
]));
|
||||
|
|
|
@ -1289,7 +1289,7 @@ function system_requirements($phase) {
|
|||
break;
|
||||
|
||||
case 'mbstring.encoding_translation':
|
||||
$requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.');
|
||||
$requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Refer to the <a href="http://php.net/mbstring">PHP mbstring documentation</a> for more information.');
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,14 +30,14 @@ class FormTestValidateRequiredForm extends FormBase {
|
|||
'#type' => 'textfield',
|
||||
'#title' => 'Name',
|
||||
'#required' => TRUE,
|
||||
'#required_error' => t('Please enter a name.'),
|
||||
'#required_error' => t('Enter a name.'),
|
||||
];
|
||||
$form['checkboxes'] = [
|
||||
'#type' => 'checkboxes',
|
||||
'#title' => 'Checkboxes',
|
||||
'#options' => $options,
|
||||
'#required' => TRUE,
|
||||
'#form_test_required_error' => t('Please choose at least one option.'),
|
||||
'#form_test_required_error' => t('Choose at least one option.'),
|
||||
'#element_validate' => $validate,
|
||||
];
|
||||
$form['select'] = [
|
||||
|
@ -45,7 +45,7 @@ class FormTestValidateRequiredForm extends FormBase {
|
|||
'#title' => 'Select',
|
||||
'#options' => $options,
|
||||
'#required' => TRUE,
|
||||
'#form_test_required_error' => t('Please select something.'),
|
||||
'#form_test_required_error' => t('Select something.'),
|
||||
'#element_validate' => $validate,
|
||||
];
|
||||
$form['radios'] = [
|
||||
|
|
|
@ -63,7 +63,7 @@ class EarlyRenderingControllerTest extends BrowserTestBase {
|
|||
$this->assertSession()->responseHeaderNotContains('X-Drupal-Cache-Tags', 'foo');
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.response-with-attachments.early'));
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\AttachmentsTestResponse.');
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\AttachmentsTestResponse.');
|
||||
|
||||
// Cacheable Response object: non-early & early.
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.cacheable-response'));
|
||||
|
@ -72,7 +72,7 @@ class EarlyRenderingControllerTest extends BrowserTestBase {
|
|||
$this->assertSession()->responseHeaderNotContains('X-Drupal-Cache-Tags', 'foo');
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.cacheable-response.early'));
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\CacheableTestResponse.');
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\CacheableTestResponse.');
|
||||
|
||||
// Basic domain object: non-early & early.
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.domain-object'));
|
||||
|
@ -91,7 +91,7 @@ class EarlyRenderingControllerTest extends BrowserTestBase {
|
|||
$this->assertSession()->responseHeaderNotContains('X-Drupal-Cache-Tags', 'foo');
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.domain-object-with-attachments.early'));
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\AttachmentsTestDomainObject.');
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\AttachmentsTestDomainObject.');
|
||||
|
||||
// Cacheable Response object: non-early & early.
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.cacheable-domain-object'));
|
||||
|
@ -100,7 +100,7 @@ class EarlyRenderingControllerTest extends BrowserTestBase {
|
|||
$this->assertSession()->responseHeaderNotContains('X-Drupal-Cache-Tags', 'foo');
|
||||
$this->drupalGet(Url::fromRoute('early_rendering_controller_test.cacheable-domain-object.early'));
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\CacheableTestDomainObject.');
|
||||
$this->assertSession()->pageTextContains('The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Ensure you are not rendering content too early. Returned object class: Drupal\early_rendering_controller_test\CacheableTestDomainObject.');
|
||||
|
||||
// The exceptions are expected. Do not interpret them as a test failure.
|
||||
// Not using File API; a potential error must trigger a PHP warning.
|
||||
|
|
|
@ -50,7 +50,7 @@ class ContainerRebuildWebTest extends BrowserTestBase {
|
|||
|
||||
// Ensure that after setting the parameter, without a container rebuild the
|
||||
// parameter is still not set.
|
||||
$this->writeSettings(['settings' => ['container_rebuild_test_parameter' => (object) ['value' => 'rebuild_me_please', 'required' => TRUE]]]);
|
||||
$this->writeSettings(['settings' => ['container_rebuild_test_parameter' => (object) ['value' => 'rebuild_me', 'required' => TRUE]]]);
|
||||
|
||||
$this->drupalGet('<front>');
|
||||
$assert->responseHeaderEquals('container_rebuild_test_parameter', NULL);
|
||||
|
@ -58,7 +58,7 @@ class ContainerRebuildWebTest extends BrowserTestBase {
|
|||
// Ensure that after container invalidation the parameter is set.
|
||||
\Drupal::service('kernel')->invalidateContainer();
|
||||
$this->drupalGet('<front>');
|
||||
$assert->responseHeaderEquals('container_rebuild_test_parameter', 'rebuild_me_please');
|
||||
$assert->responseHeaderEquals('container_rebuild_test_parameter', 'rebuild_me');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class FileSaveHtaccessLoggingTest extends BrowserTestBase {
|
|||
$this->assertFalse($htaccess->write($private, TRUE));
|
||||
$this->drupalLogin($this->rootUser);
|
||||
$this->drupalGet('admin/reports/dblog');
|
||||
$this->clickLink("Security warning: Couldn't write .htaccess file. Please…");
|
||||
$this->clickLink("Security warning: Couldn't write .htaccess file.");
|
||||
|
||||
$lines = FileSecurity::htaccessLines(TRUE);
|
||||
foreach (array_filter(explode("\n", $lines)) as $line) {
|
||||
|
|
|
@ -203,7 +203,7 @@ class MenuRouterTest extends BrowserTestBase {
|
|||
"éøïвβ中國書۞";
|
||||
$this->drupalGet($path);
|
||||
$this->assertSession()->pageTextContains('This is the menuTestCallback content.');
|
||||
$this->assertSession()->pageTextNotContains('The website encountered an unexpected error. Please try again later.');
|
||||
$this->assertSession()->pageTextNotContains('The website encountered an unexpected error. Try again later.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -171,7 +171,7 @@ class UninstallTest extends BrowserTestBase {
|
|||
// Make sure we get an error message when we try to confirm uninstallation
|
||||
// of an empty list of modules.
|
||||
$this->drupalGet('admin/modules/uninstall/confirm');
|
||||
$this->assertSession()->pageTextContains('The selected modules could not be uninstalled, either due to a website problem or due to the uninstall confirmation form timing out. Please try again.');
|
||||
$this->assertSession()->pageTextContains('The selected modules could not be uninstalled, either due to a website problem or due to the uninstall confirmation form timing out.');
|
||||
|
||||
// Make sure confirmation page is accessible only during uninstall process.
|
||||
$this->drupalGet('admin/modules/uninstall/confirm');
|
||||
|
|
|
@ -17,7 +17,7 @@ function test_theme_settings_form_system_theme_settings_alter(&$form, FormStateI
|
|||
'#title' => t('Secondary logo.'),
|
||||
'#default_value' => theme_get_setting('custom_logo'),
|
||||
'#progress_indicator' => 'bar',
|
||||
'#progress_message' => t('Please wait...'),
|
||||
'#progress_message' => t('Processing...'),
|
||||
'#upload_location' => 'public://test',
|
||||
'#upload_validators' => [
|
||||
'FileExtension' => ['extensions' => 'gif png jpg jpeg'],
|
||||
|
|
|
@ -18,7 +18,7 @@ function test_theme_theme_form_system_theme_settings_alter(&$form, FormStateInte
|
|||
'#title' => t('Secondary logo.'),
|
||||
'#default_value' => theme_get_setting('custom_logo'),
|
||||
'#progress_indicator' => 'bar',
|
||||
'#progress_message' => t('Please wait...'),
|
||||
'#progress_message' => t('Processing...'),
|
||||
'#upload_location' => 'public://test',
|
||||
'#upload_validators' => [
|
||||
'FileExtension' => ['extensions' => 'gif png jpg jpeg'],
|
||||
|
|
|
@ -169,7 +169,7 @@ class TaxonomyIndexTid extends ManyToOne {
|
|||
$vocabulary = $this->vocabularyStorage->load($this->options['vid']);
|
||||
if (empty($vocabulary) && $this->options['limit']) {
|
||||
$form['markup'] = [
|
||||
'#markup' => '<div class="js-form-item form-item">' . $this->t('An invalid vocabulary is selected. Please change it in the options.') . '</div>',
|
||||
'#markup' => '<div class="js-form-item form-item">' . $this->t('An invalid vocabulary is selected. Change it in the options.') . '</div>',
|
||||
];
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ class UserController extends ControllerBase {
|
|||
/** @var \Drupal\user\UserInterface $reset_link_user */
|
||||
if ($reset_link_user = $this->userStorage->load($uid)) {
|
||||
$this->messenger()
|
||||
->addWarning($this->t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please <a href=":logout">log out</a> and try using the link again.',
|
||||
->addWarning($this->t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. <a href=":logout">Log out</a> and try using the link again.',
|
||||
[
|
||||
'%other_user' => $account->getAccountName(),
|
||||
'%resetting_user' => $reset_link_user->getAccountName(),
|
||||
|
@ -248,7 +248,7 @@ class UserController extends ControllerBase {
|
|||
|
||||
user_login_finalize($user);
|
||||
$this->logger->info('User %name used one-time login link at time %timestamp.', ['%name' => $user->getDisplayName(), '%timestamp' => $timestamp]);
|
||||
$this->messenger()->addStatus($this->t('You have just used your one-time login link. It is no longer necessary to use this link to log in. Please set your password.'));
|
||||
$this->messenger()->addStatus($this->t('You have just used your one-time login link. It is no longer necessary to use this link to log in. It is recommended that you set your password.'));
|
||||
// Let the user's password be changed without the current password
|
||||
// check.
|
||||
$token = Crypt::randomBytesBase64(55);
|
||||
|
@ -299,7 +299,7 @@ class UserController extends ControllerBase {
|
|||
$timeout = $this->config('user.settings')->get('password_reset_timeout');
|
||||
// No time out for first time login.
|
||||
if ($user->getLastLoginTime() && $current - $timestamp > $timeout) {
|
||||
$this->messenger()->addError($this->t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.'));
|
||||
$this->messenger()->addError($this->t('You have tried to use a one-time login link that has expired. Request a new one using the form below.'));
|
||||
return $this->redirect('user.pass');
|
||||
}
|
||||
elseif ($user->isAuthenticated() && ($timestamp >= $user->getLastLoginTime()) && ($timestamp <= $current) && hash_equals($hash, user_pass_rehash($user, $timestamp))) {
|
||||
|
@ -307,7 +307,7 @@ class UserController extends ControllerBase {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
$this->messenger()->addError($this->t('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.'));
|
||||
$this->messenger()->addError($this->t('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.'));
|
||||
return $this->redirect('user.pass');
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ class UserController extends ControllerBase {
|
|||
return batch_process('<front>');
|
||||
}
|
||||
else {
|
||||
$this->messenger()->addError($this->t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'));
|
||||
$this->messenger()->addError($this->t('You have tried to use an account cancellation link that has expired. Request a new one using the form below.'));
|
||||
return $this->redirect('entity.user.cancel_form', ['user' => $user->id()], ['absolute' => TRUE]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ class UserCancelTest extends BrowserTestBase {
|
|||
// Attempt bogus account cancellation request confirmation.
|
||||
$bogus_timestamp = $timestamp + 60;
|
||||
$this->drupalGet("user/" . $account->id() . "/cancel/confirm/$bogus_timestamp/" . user_pass_rehash($account, $bogus_timestamp));
|
||||
$this->assertSession()->pageTextContains('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use an account cancellation link that has expired. Request a new one using the form below.');
|
||||
$user_storage->resetCache([$account->id()]);
|
||||
$account = $user_storage->load($account->id());
|
||||
$this->assertTrue($account->isActive(), 'User account was not canceled.');
|
||||
|
@ -162,7 +162,7 @@ class UserCancelTest extends BrowserTestBase {
|
|||
// Attempt expired account cancellation request confirmation.
|
||||
$bogus_timestamp = $timestamp - 86400 - 60;
|
||||
$this->drupalGet("user/" . $account->id() . "/cancel/confirm/$bogus_timestamp/" . user_pass_rehash($account, $bogus_timestamp));
|
||||
$this->assertSession()->pageTextContains('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use an account cancellation link that has expired. Request a new one using the form below.');
|
||||
$user_storage->resetCache([$account->id()]);
|
||||
$account = $user_storage->load($account->id());
|
||||
$this->assertTrue($account->isActive(), 'User account was not canceled.');
|
||||
|
|
|
@ -575,7 +575,7 @@ class UserLoginHttpTest extends BrowserTestBase {
|
|||
$resetURL = $urls[0];
|
||||
$this->drupalGet($resetURL);
|
||||
$this->submitForm([], 'Log in');
|
||||
$this->assertSession()->pageTextContains('You have just used your one-time login link. It is no longer necessary to use this link to log in. Please set your password.');
|
||||
$this->assertSession()->pageTextContains('You have just used your one-time login link. It is no longer necessary to use this link to log in. It is recommended that you set your password.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -151,9 +151,9 @@ class UserPasswordResetTest extends BrowserTestBase {
|
|||
// Log out, and try to log in again using the same one-time link.
|
||||
$this->drupalLogout();
|
||||
$this->drupalGet($resetURL);
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.');
|
||||
$this->drupalGet($resetURL . '/login');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.');
|
||||
|
||||
// Request a new password again, this time using the email address.
|
||||
// Count email messages before to compare with after.
|
||||
|
@ -178,9 +178,9 @@ class UserPasswordResetTest extends BrowserTestBase {
|
|||
$bogus_timestamp = REQUEST_TIME - $timeout - 60;
|
||||
$_uid = $this->account->id();
|
||||
$this->drupalGet("user/reset/$_uid/$bogus_timestamp/" . user_pass_rehash($this->account, $bogus_timestamp));
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has expired. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has expired. Request a new one using the form below.');
|
||||
$this->drupalGet("user/reset/$_uid/$bogus_timestamp/" . user_pass_rehash($this->account, $bogus_timestamp) . '/login');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has expired. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has expired. Request a new one using the form below.');
|
||||
|
||||
// Create a user, block the account, and verify that a login link is denied.
|
||||
$timestamp = REQUEST_TIME - 1;
|
||||
|
@ -207,9 +207,9 @@ class UserPasswordResetTest extends BrowserTestBase {
|
|||
$this->account->setEmail("1" . $this->account->getEmail());
|
||||
$this->account->save();
|
||||
$this->drupalGet($old_email_reset_link);
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.');
|
||||
$this->drupalGet($old_email_reset_link . '/login');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.');
|
||||
|
||||
// Verify a password reset link will automatically log a user when /login is
|
||||
// appended.
|
||||
|
@ -335,8 +335,8 @@ class UserPasswordResetTest extends BrowserTestBase {
|
|||
// Log in as a different user.
|
||||
$this->drupalLogin($this->account);
|
||||
$this->drupalGet($resetURL);
|
||||
$this->assertSession()->pageTextContains("Another user ({$this->account->getAccountName()}) is already logged into the site on this computer, but you tried to use a one-time link for user {$another_account->getAccountName()}. Please log out and try using the link again.");
|
||||
$this->assertSession()->linkExists('log out');
|
||||
$this->assertSession()->pageTextContains("Another user ({$this->account->getAccountName()}) is already logged into the site on this computer, but you tried to use a one-time link for user {$another_account->getAccountName()}. Log out and try using the link again.");
|
||||
$this->assertSession()->linkExists('Log out');
|
||||
$this->assertSession()->linkByHrefExists(Url::fromRoute('user.logout')->toString());
|
||||
|
||||
$another_account->delete();
|
||||
|
@ -576,12 +576,12 @@ class UserPasswordResetTest extends BrowserTestBase {
|
|||
// Verify that the invalid password reset page does not show the user name.
|
||||
$this->assertSession()->pageTextNotContains($user2->getAccountName());
|
||||
$this->assertSession()->addressEquals('user/password');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.');
|
||||
$this->drupalGet($attack_reset_url . '/login');
|
||||
// Verify that the invalid password reset page does not show the user name.
|
||||
$this->assertSession()->pageTextNotContains($user2->getAccountName());
|
||||
$this->assertSession()->addressEquals('user/password');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.');
|
||||
$this->assertSession()->pageTextContains('You have tried to use a one-time login link that has either been used or is no longer valid. Request a new one using the form below.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ class DisplayLink extends AreaPluginBase {
|
|||
}
|
||||
|
||||
if ($unequal_options) {
|
||||
$warning = $this->t('%current_display: The link in the %area area points to the %linked_display display which uses different settings than the %current_display display for: %unequal_options. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', [
|
||||
$warning = $this->t('%current_display: The link in the %area area points to the %linked_display display which uses different settings than the %current_display display for: %unequal_options. To make sure users see the exact same result when clicking the link, check that the settings are the same.', [
|
||||
'%current_display' => $this->displayHandler->display['display_title'],
|
||||
'%area' => $this->areaType,
|
||||
'%linked_display' => $this->view->displayHandlers->get($linked_display_id)->display['display_title'],
|
||||
|
|
|
@ -517,7 +517,7 @@ abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouter
|
|||
&& is_numeric($matches[1]));
|
||||
});
|
||||
if (!empty($numeric_placeholders)) {
|
||||
$errors[] = $this->t("Numeric placeholders may not be used. Please use plain placeholders (%).");
|
||||
$errors[] = $this->t("Numeric placeholders may not be used. Use plain placeholders (%).");
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
|
|
|
@ -540,7 +540,7 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac
|
|||
'#title' => $this->t('Display all values in the same row'),
|
||||
'#type' => 'checkbox',
|
||||
'#default_value' => $this->options['group_rows'],
|
||||
'#description' => $this->t('If checked, multiple values for this field will be shown in the same row. If not checked, each value in this field will create a new row. If using group by, please make sure to group by "Entity ID" for this setting to have any effect.'),
|
||||
'#description' => $this->t('If checked, multiple values for this field will be shown in the same row. If not checked, each value in this field will create a new row. If using group by, make sure to group by "Entity ID" for this setting to have any effect.'),
|
||||
'#fieldset' => 'multiple_field_settings',
|
||||
];
|
||||
|
||||
|
|
|
@ -417,9 +417,9 @@ class AreaDisplayLinkTest extends ViewsKernelTestBase {
|
|||
|
||||
$this->assertCount(0, $errors);
|
||||
$this->assertCount(3, $messages);
|
||||
$this->assertSame('<em class="placeholder">Block 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Block 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[0]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 2</em> display which uses different settings than the <em class="placeholder">Page 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[1]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 2</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Page 2</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[2]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Block 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Block 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[0]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 2</em> display which uses different settings than the <em class="placeholder">Page 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[1]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 2</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Page 2</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[2]->__toString());
|
||||
|
||||
$messenger->deleteAll();
|
||||
|
||||
|
@ -432,10 +432,10 @@ class AreaDisplayLinkTest extends ViewsKernelTestBase {
|
|||
|
||||
$this->assertCount(0, $errors);
|
||||
$this->assertCount(4, $messages);
|
||||
$this->assertSame('<em class="placeholder">Default</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Default</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[0]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Block 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Block 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[1]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 2</em> display which uses different settings than the <em class="placeholder">Page 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[2]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 2</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Page 2</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, please check that the settings are the same.', $messages[3]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Default</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Default</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[0]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Block 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Block 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[1]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 1</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 2</em> display which uses different settings than the <em class="placeholder">Page 1</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[2]->__toString());
|
||||
$this->assertSame('<em class="placeholder">Page 2</em>: The link in the <em class="placeholder">header</em> area points to the <em class="placeholder">Page 1</em> display which uses different settings than the <em class="placeholder">Page 2</em> display for: <em class="placeholder">' . $unequal_options_text . '</em>. To make sure users see the exact same result when clicking the link, check that the settings are the same.', $messages[3]->__toString());
|
||||
|
||||
$messenger->deleteAll();
|
||||
$this->config('views.settings')->set('ui.show.default_display', FALSE)->save();
|
||||
|
|
|
@ -112,7 +112,7 @@ class DisplayPathTest extends UITestBase {
|
|||
$this->drupalGet($url);
|
||||
$this->submitForm(['path' => 'user/%1/example'], 'Apply');
|
||||
$this->assertSession()->addressEquals($url);
|
||||
$this->assertSession()->pageTextContains("Numeric placeholders may not be used. Please use plain placeholders (%).");
|
||||
$this->assertSession()->pageTextContains("Numeric placeholders may not be used. Use plain placeholders (%).");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -203,7 +203,7 @@ class DemoUmamiProfileTest extends BrowserTestBase {
|
|||
* If a user is already logged in, then the current user is logged out before
|
||||
* logging in the specified user.
|
||||
*
|
||||
* Please note that neither the current user nor the passed-in user object is
|
||||
* Note that neither the current user nor the passed-in user object is
|
||||
* populated with data of the logged in user. If you need full access to the
|
||||
* user object after logging in, it must be updated manually. If you also need
|
||||
* access to the plain-text password of the user (set by drupalCreateUser()),
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
*/
|
||||
Drupal.theme.mediaEmbedPreviewError = () =>
|
||||
`<div class="media-embed-error media-embed-error--preview-error">${Drupal.t(
|
||||
'An error occurred while trying to preview the media. Please save your work and reload this page.',
|
||||
'An error occurred while trying to preview the media. Save your work and reload this page.',
|
||||
)}</div>`;
|
||||
})(Drupal);
|
||||
|
|
|
@ -57,7 +57,7 @@ if ($args['help'] || $count == 0) {
|
|||
simpletest_script_init();
|
||||
|
||||
if (!class_exists(TestCase::class)) {
|
||||
echo "\nrun-tests.sh requires the PHPUnit testing framework. Please use 'composer install' to ensure that it is present.\n\n";
|
||||
echo "\nrun-tests.sh requires the PHPUnit testing framework. Use 'composer install' to ensure that it is present.\n\n";
|
||||
exit(SIMPLETEST_SCRIPT_EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
|
|||
|
||||
$this->drupalGet('');
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Please try again later.');
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Try again later.');
|
||||
$this->assertSession()->pageTextNotContains($this->expectedExceptionMessage);
|
||||
|
||||
$settings = [];
|
||||
|
@ -83,7 +83,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
|
|||
|
||||
$this->drupalGet('');
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Please try again later.');
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Try again later.');
|
||||
$this->assertSession()->pageTextContains($this->expectedExceptionMessage);
|
||||
$this->assertErrorLogged($this->expectedExceptionMessage);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
|
|||
|
||||
$this->drupalGet('');
|
||||
$this->assertSession()->statusCodeEquals(418);
|
||||
$this->assertSession()->pageTextNotContains('The website encountered an unexpected error. Please try again later.');
|
||||
$this->assertSession()->pageTextNotContains('The website encountered an unexpected error. Try again later.');
|
||||
$this->assertSession()->pageTextNotContains('Oh oh, bananas in the instruments');
|
||||
$this->assertSession()->pageTextContains('Oh oh, flying teapots');
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
|
|||
|
||||
$this->drupalGet('');
|
||||
$this->assertSession()->statusCodeEquals(500);
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Please try again later.');
|
||||
$this->assertSession()->pageTextContains('The website encountered an unexpected error. Try again later.');
|
||||
$this->assertSession()->pageTextContains($this->expectedExceptionMessage);
|
||||
|
||||
// Find fatal error logged to the error.log
|
||||
|
|
|
@ -21,9 +21,9 @@ class FactoryTest extends PluginTestBase {
|
|||
*/
|
||||
public function testDefaultFactory() {
|
||||
// Ensure a non-derivative plugin can be instantiated.
|
||||
$plugin = $this->testPluginManager->createInstance('user_login', ['title' => 'Please enter your login name and password']);
|
||||
$plugin = $this->testPluginManager->createInstance('user_login', ['title' => 'Enter your login name and password']);
|
||||
$this->assertSame('Drupal\\plugin_test\\Plugin\\plugin_test\\mock_block\\MockUserLoginBlock', get_class($plugin), 'Correct plugin class instantiated with default factory.');
|
||||
$this->assertSame('Please enter your login name and password', $plugin->getTitle(), 'Plugin instance correctly configured.');
|
||||
$this->assertSame('Enter your login name and password', $plugin->getTitle(), 'Plugin instance correctly configured.');
|
||||
|
||||
// Ensure that attempting to instantiate non-existing plugins throws a
|
||||
// PluginException.
|
||||
|
@ -48,9 +48,9 @@ class FactoryTest extends PluginTestBase {
|
|||
*/
|
||||
public function testReflectionFactory() {
|
||||
// Ensure a non-derivative plugin can be instantiated.
|
||||
$plugin = $this->mockBlockManager->createInstance('user_login', ['title' => 'Please enter your login name and password']);
|
||||
$plugin = $this->mockBlockManager->createInstance('user_login', ['title' => 'Enter your login name and password']);
|
||||
$this->assertSame('Drupal\\plugin_test\\Plugin\\plugin_test\\mock_block\\MockUserLoginBlock', get_class($plugin), 'Correct plugin class instantiated.');
|
||||
$this->assertSame('Please enter your login name and password', $plugin->getTitle(), 'Plugin instance correctly configured.');
|
||||
$this->assertSame('Enter your login name and password', $plugin->getTitle(), 'Plugin instance correctly configured.');
|
||||
|
||||
// Ensure a derivative plugin can be instantiated.
|
||||
$plugin = $this->mockBlockManager->createInstance('menu:main_menu', ['depth' => 2]);
|
||||
|
|
|
@ -35,19 +35,19 @@ class FormattableMarkupTest extends TestCase {
|
|||
* @covers ::jsonSerialize
|
||||
*/
|
||||
public function testToString() {
|
||||
$string = 'Can I please have a @replacement';
|
||||
$string = 'Can I have a @replacement';
|
||||
$formattable_string = new FormattableMarkup($string, ['@replacement' => 'kitten']);
|
||||
$text = (string) $formattable_string;
|
||||
$this->assertEquals('Can I please have a kitten', $text);
|
||||
$this->assertEquals('Can I have a kitten', $text);
|
||||
$text = $formattable_string->jsonSerialize();
|
||||
$this->assertEquals('Can I please have a kitten', $text);
|
||||
$this->assertEquals('Can I have a kitten', $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::count
|
||||
*/
|
||||
public function testCount() {
|
||||
$string = 'Can I please have a @replacement';
|
||||
$string = 'Can I have a @replacement';
|
||||
$formattable_string = new FormattableMarkup($string, ['@replacement' => 'kitten']);
|
||||
$this->assertEquals(strlen($string), $formattable_string->count());
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ class HtmlEscapedTextTest extends TestCase {
|
|||
* @covers ::count
|
||||
*/
|
||||
public function testCount() {
|
||||
$string = 'Can I please have a <em>kitten</em>';
|
||||
$string = 'Can I have a <em>kitten</em>';
|
||||
$escapable_string = new HtmlEscapedText($string);
|
||||
$this->assertEquals(strlen($string), $escapable_string->count());
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class FinalExceptionSubscriberTest extends UnitTestCase {
|
|||
$response = $event->getResponse();
|
||||
|
||||
$this->assertInstanceOf(Response::class, $response);
|
||||
$this->assertStringStartsWith('The website encountered an unexpected error. Please try again later.<br><br><em class="placeholder">Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException</em>: test message in ', $response->getContent());
|
||||
$this->assertStringStartsWith('The website encountered an unexpected error. Try again later.<br><br><em class="placeholder">Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException</em>: test message in ', $response->getContent());
|
||||
$this->assertEquals(405, $response->getStatusCode());
|
||||
$this->assertEquals('POST, PUT', $response->headers->get('Allow'));
|
||||
// Also check that the text/plain content type was added.
|
||||
|
|
|
@ -371,11 +371,11 @@ class FormStateTest extends UnitTestCase {
|
|||
public function testTemporaryValue() {
|
||||
$form_state = new FormState();
|
||||
$this->assertFalse($form_state->hasTemporaryValue('rainbow_sparkles'));
|
||||
$form_state->setTemporaryValue('rainbow_sparkles', 'yes please');
|
||||
$this->assertSame($form_state->getTemporaryValue('rainbow_sparkles'), 'yes please');
|
||||
$form_state->setTemporaryValue('rainbow_sparkles', 'yes');
|
||||
$this->assertSame($form_state->getTemporaryValue('rainbow_sparkles'), 'yes');
|
||||
$this->assertTrue($form_state->hasTemporaryValue('rainbow_sparkles'), TRUE);
|
||||
$form_state->setTemporaryValue(['rainbow_sparkles', 'magic_ponies'], 'yes please');
|
||||
$this->assertSame($form_state->getTemporaryValue(['rainbow_sparkles', 'magic_ponies']), 'yes please');
|
||||
$form_state->setTemporaryValue(['rainbow_sparkles', 'magic_ponies'], 'yes');
|
||||
$this->assertSame($form_state->getTemporaryValue(['rainbow_sparkles', 'magic_ponies']), 'yes');
|
||||
$this->assertTrue($form_state->hasTemporaryValue(['rainbow_sparkles', 'magic_ponies']), TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class TranslatableMarkupTest extends UnitTestCase {
|
|||
public function testToString() {
|
||||
$translation = $this->createMock(TranslationInterface::class);
|
||||
|
||||
$string = 'May I have an exception please?';
|
||||
$string = 'May I have an exception?';
|
||||
$text = $this->getMockBuilder(TranslatableMarkup::class)
|
||||
->setConstructorArgs([$string, [], [], $translation])
|
||||
->onlyMethods(['_die'])
|
||||
|
|
|
@ -32,6 +32,7 @@ trait PhpUnitWarnings {
|
|||
'Support for using expectException() with PHPUnit\\Framework\\Error\\Error is deprecated and will be removed in PHPUnit 10. Use expectError() instead.',
|
||||
'assertDirectoryNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotWritable() instead.',
|
||||
'assertFileNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileIsNotWritable() instead.',
|
||||
// cspell:disable-next-line
|
||||
'The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.',
|
||||
// PHPUnit 9.6.
|
||||
'Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10.',
|
||||
|
|
|
@ -127,7 +127,7 @@ trait UiHelperTrait {
|
|||
* If a user is already logged in, then the current user is logged out before
|
||||
* logging in the specified user.
|
||||
*
|
||||
* Please note that neither the current user nor the passed-in user object is
|
||||
* Note that neither the current user nor the passed-in user object is
|
||||
* populated with data of the logged in user. If you need full access to the
|
||||
* user object after logging in, it must be updated manually. If you also need
|
||||
* access to the plain-text password of the user (set by drupalCreateUser()),
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
*/
|
||||
Drupal.theme.mediaEmbedPreviewError = () =>
|
||||
`<div class="media-embed-error media-embed-error--preview-error">${Drupal.t(
|
||||
'An error occurred while trying to preview the media. Please save your work and reload this page.',
|
||||
'An error occurred while trying to preview the media. Save your work and reload this page.',
|
||||
)}</div>`;
|
||||
})(Drupal);
|
||||
|
|
Loading…
Reference in New Issue