Issue #2819245 by vagelis-prokopiou, mayurjadhav, narendra.rajwar27, PatashINotFound, AkashkumarOSL, davidhernandez, Vidushi Mehta, cilefen, lauriii, longwave: "Javascript" should be "JavaScript"

merge-requests/7/head
catch 2020-08-28 12:32:33 +01:00
parent 4790a87d1e
commit 99b9ff858a
33 changed files with 44 additions and 44 deletions

View File

@ -20,7 +20,7 @@ Drupal includes works under other copyright notices and distributed
according to the terms of the GNU General Public License or a compatible
license, including:
Javascript
JavaScript
Farbtastic - Copyright (c) 2010 Matt Farina

View File

@ -1,6 +1,6 @@
/**
* @file
* Defines Javascript behaviors for the block_content module.
* Defines JavaScript behaviors for the block_content module.
*/
(function($, Drupal) {

View File

@ -7,7 +7,7 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\system\Entity\Action;
/**
* Tests action plugins using Javascript.
* Tests action plugins using JavaScript.
*
* @group action
*/

View File

@ -1,6 +1,6 @@
/**
* @file
* Javascript behaviors for the Book module.
* JavaScript behaviors for the Book module.
*/
(function($, Drupal) {

View File

@ -148,7 +148,7 @@ function book_form_node_form_alter(&$form, FormStateInterface $form_state, $form
if ($access) {
$collapsed = !($node->isNew() && !empty($node->book['pid']));
$form = \Drupal::service('book.manager')->addFormElements($form, $form_state, $node, $account, $collapsed);
// The "js-hide" class hides submit button when Javascript is enabled.
// The "js-hide" class hides submit button when JavaScript is enabled.
$form['book']['pick-book'] = [
'#type' => 'submit',
'#value' => t('Change book (update list of parents)'),

View File

@ -142,7 +142,7 @@ class FieldTranslationSynchronizer implements FieldTranslationSynchronizerInterf
// If a group was selected has the require_all_groups_for_translation
// flag set, there are no untranslatable columns. This is done because
// the UI adds Javascript that disables the other checkboxes, so their
// the UI adds JavaScript that disables the other checkboxes, so their
// values are not saved.
foreach (array_filter($translation_sync) as $group) {
if (!empty($column_groups[$group]['require_all_groups_for_translation'])) {

View File

@ -1,6 +1,6 @@
/**
* @file
* Defines Javascript behaviors for the media form.
* Defines JavaScript behaviors for the media form.
*/
(function($, Drupal) {

View File

@ -1,6 +1,6 @@
/**
* @file
* Javascript for the node content editing form.
* JavaScript for the node content editing form.
*/
(function($, Drupal) {

View File

@ -1,6 +1,6 @@
/**
* @file
* Defines Javascript behaviors for the node module.
* Defines JavaScript behaviors for the node module.
*/
(function($, Drupal, drupalSettings) {

View File

@ -120,7 +120,7 @@ function settings_tray_preprocess_block(&$variables) {
if (isset($variables['elements']['#contextual_links']['block']['route_parameters']['block'])) {
$block = Block::load($variables['elements']['#contextual_links']['block']['route_parameters']['block']);
if ($access_checker->accessBlockPlugin($block_plugin)->isAllowed() && !_settings_tray_has_block_overrides($block)) {
// Add class and attributes to all blocks to allow Javascript to target.
// Add class and attributes to all blocks to allow JavaScript to target.
$variables['attributes']['class'][] = 'settings-tray-editable';
$variables['attributes']['data-drupal-settingstray'] = 'editable';
}

View File

@ -1,6 +1,6 @@
/**
* @file
* Utility classes to assist with Javascript functionality.
* Utility classes to assist with JavaScript functionality.
*/
/**

View File

@ -30,7 +30,7 @@ class JSMessageTestController {
}
/**
* Displays links to show messages via Javascript.
* Displays links to show messages via JavaScript.
*
* @return array
* Render array for links.

View File

@ -63,7 +63,7 @@ class DestinationTest extends BrowserTestBase {
[
'input' => 'javascript:alert(0)',
'output' => 'javascript:alert(0)',
'message' => 'Javascript URL is allowed because it is treated as an internal URL.',
'message' => 'JavaScript URL is allowed because it is treated as an internal URL.',
],
];
foreach ($test_cases as $test_case) {

View File

@ -91,7 +91,7 @@ views.style.table:
label: 'Override normal sorting if click sorting is used'
sticky:
type: boolean
label: 'Enable Drupal style "sticky" table headers (Javascript)'
label: 'Enable Drupal style "sticky" table headers (JavaScript)'
summary:
type: label
label: 'Summary title'

View File

@ -51,7 +51,7 @@
Drupal.views.instances = {};
/**
* Javascript object for a certain view.
* JavaScript object for a certain view.
*
* @constructor
*

View File

@ -215,7 +215,7 @@ class Table extends StylePluginBase implements CacheableDependencyInterface {
$form['sticky'] = [
'#type' => 'checkbox',
'#title' => $this->t('Enable Drupal style "sticky" table headers (Javascript)'),
'#title' => $this->t('Enable Drupal style "sticky" table headers (JavaScript)'),
'#default_value' => !empty($this->options['sticky']),
'#description' => $this->t('(Sticky header effects will not be active for preview below, only on live output.)'),
];

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*

View File

@ -193,7 +193,7 @@ function views_ui_ajax_update_form($form, FormStateInterface $form_state) {
}
/**
* Non-Javascript fallback for updating the add view form.
* Non-JavaScript fallback for updating the add view form.
*/
function views_ui_nojs_submit($form, FormStateInterface $form_state) {
$form_state->setRebuild();

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*/

View File

@ -47,7 +47,7 @@ class DialogPositionTest extends WebDriverTestBase {
$dialog = $page->find('css', '.ui-dialog');
$this->assertNull($dialog, 'Dialog is closed after clicking the close button.');
// Resize the window. The test should pass after waiting for Javascript to
// Resize the window. The test should pass after waiting for JavaScript to
// finish as no Javascript errors should have been triggered. If there were
// javascript errors the test will fail on that.
$session->resizeWindow(625, 625);

View File

@ -222,7 +222,7 @@ JS;
* Test that a node, or its specific corner, is visible in the viewport.
*
* Note: Always set the viewport size. This can be done in your test with
* \Behat\Mink\Session->resizeWindow(). Drupal CI Javascript tests by default
* \Behat\Mink\Session->resizeWindow(). Drupal CI JavaScript tests by default
* use a viewport of 1024x768px.
*
* @param string $selector_type
@ -319,7 +319,7 @@ JS;
private function checkNodeVisibilityInViewport(NodeElement $node, $corner = FALSE) {
$xpath = $node->getXpath();
// Build the Javascript to test if the complete element or a specific corner
// Build the JavaScript to test if the complete element or a specific corner
// is in the viewport.
switch ($corner) {
case 'topLeft':
@ -392,7 +392,7 @@ JS;
throw new UnsupportedDriverActionException($corner, $this->session->getDriver());
}
// Build the full Javascript test. The shared logic gets the corner
// Build the full JavaScript test. The shared logic gets the corner
// specific test logic injected.
$full_javascript_visibility_test = <<<JS
(function(t){
@ -408,7 +408,7 @@ JS;
}($test_javascript_function));
JS;
// Check the visibility by injecting and executing the full Javascript test
// Check the visibility by injecting and executing the full JavaScript test
// script in the page.
return $this->session->evaluateScript($full_javascript_visibility_test);
}

View File

@ -32,7 +32,7 @@ class JavascriptGetDrupalSettingsTest extends WebDriverTestBase {
$js_settings = $this->getDrupalSettings();
$this->assertSame('azAZ09();.,\\\/-_{}', $js_settings['test-setting']);
// Dynamically change the setting using Javascript.
// Dynamically change the setting using JavaScript.
$script = <<<EndOfScript
(function () {
drupalSettings['test-setting'] = 'foo';

View File

@ -7,7 +7,7 @@ use Drupal\Tests\BrowserTestBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Runs a browser test using a driver that supports Javascript.
* Runs a browser test using a driver that supports JavaScript.
*
* Base class for testing browser interaction implemented in JavaScript.
*
@ -129,7 +129,7 @@ abstract class WebDriverTestBase extends BrowserTestBase {
* @see \Behat\Mink\Driver\DriverInterface::evaluateScript()
*/
protected function assertJsCondition($condition, $timeout = 10000, $message = '') {
$message = $message ?: "Javascript condition met:\n" . $condition;
$message = $message ?: "JavaScript condition met:\n" . $condition;
$result = $this->getSession()->getDriver()->wait($timeout, $condition);
$this->assertTrue($result, $message);
}

View File

@ -14,7 +14,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The status code.
*/
public function statusCodeEquals($code) {
@trigger_error('Support for statusCodeEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for statusCodeEquals is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::statusCodeEquals($code);
}
@ -25,7 +25,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The status code.
*/
public function statusCodeNotEquals($code) {
@trigger_error('Support for statusCodeNotEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for statusCodeNotEquals is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::statusCodeNotEquals($code);
}
@ -38,7 +38,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The value to check the header against.
*/
public function responseHeaderEquals($name, $value) {
@trigger_error('Support for responseHeaderEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for responseHeaderEquals is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::responseHeaderEquals($name, $value);
}
@ -51,7 +51,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The value to check the header against.
*/
public function responseHeaderNotEquals($name, $value) {
@trigger_error('Support for responseHeaderNotEquals is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for responseHeaderNotEquals is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::responseHeaderNotEquals($name, $value);
}
@ -64,7 +64,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The value to check the header against.
*/
public function responseHeaderContains($name, $value) {
@trigger_error('Support for responseHeaderContains is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for responseHeaderContains is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::responseHeaderContains($name, $value);
}
@ -77,7 +77,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The value to check the header against.
*/
public function responseHeaderNotContains($name, $value) {
@trigger_error('Support for responseHeaderNotContains is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for responseHeaderNotContains is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::responseHeaderNotContains($name, $value);
}
@ -90,7 +90,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The value to check the header against.
*/
public function responseHeaderMatches($name, $regex) {
@trigger_error('Support for responseHeaderMatches is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for responseHeaderMatches is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::responseHeaderMatches($name, $regex);
}
@ -103,7 +103,7 @@ class WebDriverWebAssert extends JSWebAssert {
* The value to check the header against.
*/
public function responseHeaderNotMatches($name, $regex) {
@trigger_error('Support for responseHeaderNotMatches is to be dropped from Javascript tests. See https://www.drupal.org/node/2857562.');
@trigger_error('Support for responseHeaderNotMatches is to be dropped from JavaScript tests. See https://www.drupal.org/node/2857562.');
parent::responseHeaderNotMatches($name, $regex);
}

View File

@ -146,7 +146,7 @@ trait AssertLegacyTrait {
$raw_content = $this->getSession()->getPage()->getContent();
// Trying to simulate what the user sees, given that it removes all text
// inside the head tags, removes inline Javascript, fix all HTML entities,
// inside the head tags, removes inline JavaScript, fix all HTML entities,
// removes dangerous protocols and filtering out all HTML tags, as they are
// not visible in a normal browser.
$raw_content = preg_replace('@<head>(.+?)</head>@si', '', $raw_content);

View File

@ -840,7 +840,7 @@ class ConfirmClassyCopiesTest extends KernelTestBase {
'views-view-mapping-test.html.twig' => '818431786e1d19df33cecccad98d5a22',
'views-view-opml.html.twig' => '4ab17668908dcd4af75d35f891f97fff',
'views-view-summary-unformatted.html.twig' => '76f6e5882aa7fe6bc0440b66e85a0a6c',
'views-view.html.twig' => 'd20ba03bc36703828bb7651baa15f28f',
'views-view.html.twig' => '6e823aff4c9a83fa2f426510a90e8f7d',
'views-view-grid.html.twig' => '8f4ea66bf949530d31a79a44f3d87650',
'views-view-rss.html.twig' => 'f4e49d0d8df01019245c51ff2a4259c2',
'block--system-branding-block.html.twig' => '558d83af4c06e78f46790e0e18295588',

View File

@ -321,7 +321,7 @@ class RequestSanitizerTest extends UnitTestCase {
$data[] = ['/example.com'];
// Internal URL using a colon is allowed.
$data[] = ['example:test'];
// Javascript URL is allowed because it is treated as an internal URL.
// JavaScript URL is allowed because it is treated as an internal URL.
$data[] = ['javascript:alert(0)'];
return $data;
}

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*/

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*/

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*/

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*/

View File

@ -1,6 +1,6 @@
/**
* @file
* Utility classes to assist with Javascript functionality.
* Utility classes to assist with JavaScript functionality.
*/
/**

View File

@ -25,7 +25,7 @@
* - attachment_after: An optional attachment view to be displayed after the
* view content.
* - dom_id: Unique id for every view being printed to give unique class for
* Javascript.
* JavaScript.
*
* @see template_preprocess_views_view()
*/