Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated spelling in a bunch of places. #231

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ QuantCDN is a global CDN engineered specifically for the static web and Jamstack

It allows one-time compilation and push of an entire Drupal site, as well as tracking and pushes of ongoing content change; the simplest way to export and maintain a static export of your Drupal site.

Development, issues and feature roadmap occurs in the [Github repository](https://github.com/quantcdn/drupal).
Development, issues and feature roadmap occurs in the [GitHub repository](https://github.com/quantcdn/drupal).

## Installation and usage

Expand Down
2 changes: 1 addition & 1 deletion modules/quant_api/src/Exception/InvalidResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Drupal\quant_api\Exception;

/**
* Invalid reponse exception.
* Invalid response exception.
*/
class InvalidResponse extends \Exception {

Expand Down
4 changes: 2 additions & 2 deletions modules/quant_cron/quant_cron.module
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @file
* Add cron support for quant processing.
* Add cron support for Quant processing.
*/

use Drupal\quant\Seed;
Expand Down Expand Up @@ -270,7 +270,7 @@ function quant_cron_get_views_routes() {

$paths[] = $path;

// Languge negotiation may also provide path prefixes.
// Language negotiation may also provide path prefixes.
if ($prefixes = \Drupal::config('language.negotiation')->get('url.prefixes')) {
foreach ($prefixes as $prefix) {
$paths[] = "/{$prefix}/{$path}";
Expand Down
2 changes: 1 addition & 1 deletion modules/quant_cron/src/Form/CronSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['lunr'] = [
'#type' => 'checkbox',
'#title' => 'Lunr search assets',
'#description' => $this->t('Exports required lunr javascript libraries and all search indexes for decoupled search.'),
'#description' => $this->t('Exports required Lunr JavaScript libraries and all search indexes for decoupled search.'),
'#default_value' => $config->get('lunr'),
];
}
Expand Down
2 changes: 1 addition & 1 deletion modules/quant_purger/config/schema/quant_purger.schema.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Schema for the configuration files of the purge_queuer_url module.
quant_purger.settings:
type: config_object
label: 'quant purger settings.'
label: 'Quant purger settings.'
mapping:
tag_blacklist:
label: 'A list of string tags that will not trigger a queue.'
Expand Down
2 changes: 1 addition & 1 deletion modules/quant_purger/quant_purger.install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @file
* Install the quant cache tags purger.
* Install the Quant cache tags purger.
*/

/**
Expand Down
8 changes: 4 additions & 4 deletions modules/quant_purger/src/Form/ConfigurationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
}

$form['path_blocklist_fieldset']['#description'] = $this->t('The Quant purge queuer collects HTTP requests that the Quant module makes to generate static representations of content. It requires that the request has a valid token to limit the performance impact of gathering traffic information in such a manner. This is a user-managed list of paths and query strings that will be excluded from traffic gathering.');
$form['path_allowlist_fieldset']['#description'] = $this->t('This list overrides paths in the blocklist for more granularly. For example, <code>/admin/*</code> could be in the blocklist and <code>/admin/special/page</code> could be in the allowlist so all admin pages except that one would be excluded.');
$form['path_allowlist_fieldset']['#description'] = $this->t('This list overrides paths in the blocklist for more granular control. For example, <code>/admin/*</code> could be in the blocklist and <code>/admin/special/page</code> could be in the allowlist so all admin pages except that one would be excluded.');
$form['tag_blocklist_fieldset']['#description'] = $this->t('If this list is empty, all cache tag invalidations will trigger a queue entry. Some of these invalidations can have widespread effects on the site and require a full content seed. This setting allows you to exclude certain tags from triggering a content re-seed.');
$form['tag_allowlist_fieldset']['#description'] = $this->t('This list overrides tags in the blocklist for more granularly. For example, <code>config:*</code> could be in the blocklist and <code>config:system.menu.main</code> could be in the allowlist so all config except that one would be excluded.');
$form['tag_allowlist_fieldset']['#description'] = $this->t('This list overrides tags in the blocklist for more granular control. For example, <code>config:*</code> could be in the blocklist and <code>config:system.menu.main</code> could be in the allowlist so all config except that one would be excluded.');

$form['actions']['clear'] = [
'#type' => 'submit',
Expand Down Expand Up @@ -153,7 +153,7 @@ public function submitFormSuccess(array &$form, FormStateInterface $form_state)
->set('path_allowlist', $form_state->getValue('path_allowlist'))
->save();

\Drupal::messenger()->addMessage($this->t('Succesfully saved the Quant Purger configuration. All content must be re-seeded so the database reflects the changes.'));
\Drupal::messenger()->addMessage($this->t('Successfully saved the Quant Purger configuration. All content must be re-seeded so the database reflects the changes.'));
}

/**
Expand All @@ -170,7 +170,7 @@ public function submitFormClear(array &$form, FormStateInterface $form_state) {
if (!$form_state->getErrors()) {
\Drupal::service('quant_purger.registry')->clear();
$status = 'status';
$message = $this->t('Succesfully cleared the traffic registry. All content must be re-seeded so the database reflects the configuration.');
$message = $this->t('Successfully cleared the traffic registry. All content must be re-seeded so the database reflects the configuration.');
}
else {
$status = 'error';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait TraitUrlRegistrar {
* If the request can be cached.
*/
public function determine(Request $request, Response $response) {
// Don't gather responses that don't have a quant token. As this
// Don't gather responses that don't have a Quant token. As this
// is a HTTP middleware we need to make sure this is as lean as
// possible - we don't want to add a huge performance burden to
// begin tracking pages to cachetags.
Expand Down
4 changes: 2 additions & 2 deletions modules/quant_purger/src/StackMiddleware/UrlRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class UrlRegistrar implements HttpKernelInterface {
protected $registry;

/**
* The configuration object for quant purger.
* The configuration object for Quant purger.
*
* @var \Drupal\Core\Config\ImmutableConfig
*/
Expand Down Expand Up @@ -94,7 +94,7 @@ class UrlRegistrar implements HttpKernelInterface {
protected $registry;

/**
* The configuration object for quant purger.
* The configuration object for Quant purger.
*
* @var \Drupal\Core\Config\ImmutableConfig
*/
Expand Down
6 changes: 3 additions & 3 deletions modules/quant_purger/src/TrafficRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Drupal\quant_purger\StackMiddleware\TraitUrlRegistrar;

/**
* The quant traffic registry.
* The Quant traffic registry.
*/
class TrafficRegistry implements TrafficRegistryInterface {

Expand All @@ -21,14 +21,14 @@ class TrafficRegistry implements TrafficRegistryInterface {
protected $connection;

/**
* The configuration object for quant purger.
* The configuration object for Quant purger.
*
* @var \Drupal\Core\Config\ImmutableConfig
*/
protected $config;

/**
* Constructs a quant traffic registry event.
* Constructs a Quant traffic registry event.
*
* @param \Drupal\Core\Database\Connection $connection
* The active database connection.
Expand Down
4 changes: 2 additions & 2 deletions modules/quant_search/src/Controller/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ public function enabled() {
}

/**
* Sanitises values to send to Algolia.
* Sanitizes values to send to Algolia.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And so it begins! :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! But "technically" Drupal code is supposed to be in American English...

*/
private static function sanitizeValues($value) {
// Ensures &#[0-9]+ entities are converted to utf-8.
// Ensures &#[0-9]+ entities are converted to UTF-8.
$value = preg_replace_callback("/(&#[0-9]+;)/", function ($m) {
return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES");
}, $value);
Expand Down
2 changes: 1 addition & 1 deletion modules/quant_sitemap/src/SitemapManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ protected function getXmlSitemaps() : array {
if (empty($context['language']) || $context['language'] == $lang_code) {
// Default langcode is always served via sitemap.xml as a hard coded
// link from xmlsitemap and this will result in a 404 — so we just
// skip the default langauge for now.
// skip the default language for now.
continue;
}
$items[] = "/{$context['language']}/sitemap.xml";
Expand Down
8 changes: 4 additions & 4 deletions modules/quant_sitemap/tests/src/Unit/SitemapManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class SitemapManagerTest extends KernelTestBase {

/**
* Verify quant sitemap compatibilty with xmlsitemap.
* Verify Quant sitemap compatibility with xmlsitemap.
*/
public function testSimpleSitemapSupportedVersion() {
$module_handler_mock = $this->createMock(ModuleHandler::class);
Expand Down Expand Up @@ -47,7 +47,7 @@ public function testSimpleSitemapSupportedVersion() {
}

/**
* Verify quant sitemap compatibilty with simple_sitemap.
* Verify Quant sitemap compatibility with simple_sitemap.
*/
public function testSimpleSitemapUnsupportedVersion() {
$module_handler_mock = $this->createMock(ModuleHandler::class);
Expand Down Expand Up @@ -77,7 +77,7 @@ public function testSimpleSitemapUnsupportedVersion() {
}

/**
* Verify quant sitemap compatibilty with xmlsitemap.
* Verify Quant sitemap compatibility with xmlsitemap.
*/
public function testXmlsitemapSupportedVersion() {
$module_handler_mock = $this->createMock(ModuleHandler::class);
Expand Down Expand Up @@ -107,7 +107,7 @@ public function testXmlsitemapSupportedVersion() {
}

/**
* Verify quant sitemap compatibilty with xmlsitemap.
* Verify Quant sitemap compatibility with xmlsitemap.
*/
public function testXmlsitemapUnsupportedVersion() {
$module_handler_mock = $this->createMock(ModuleHandler::class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{#
/**
* @file
* Default theme implementation of a quant submission result.
* Default theme implementation of a Quant submission result.
*
* @ingroup themeable
*/
Expand Down
4 changes: 2 additions & 2 deletions quant.links.menu.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
quant:
title: 'Quant'
route_name: quant.config
description: 'Configuration for the quant static exporter'
description: 'Configuration for the Quant static exporter'
parent: system.admin_config
weight: 10

quant.config:
title: 'Quant'
route_name: quant.config
description: 'Configuration for the quant static exporter'
description: 'Configuration for the Quant static exporter'
parent: quant
weight: 1

Expand Down
4 changes: 2 additions & 2 deletions src/Commands/QuantDrushCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function message($options = ['threads' => 5]) {
}

/**
* Unlock quant queue.
* Unlock Quant queue.
*
* @command quant:unlock-queue
* @aliases quant-queue-unlock
Expand All @@ -125,7 +125,7 @@ public function unlock($options = []) {
}

/**
* Clear the quant queue.
* Clear the Quant queue.
*
* @command quant:clear-queue
* @aliases quant-queue-clear
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/QuantValidateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class QuantValidateController {

/**
* Returns a simple Symfony Http Response.
* Returns a simple Symfony HTTP Response.
*
* @return \Symfony\Component\HttpFoundation\Response
* The validation content to return.
Expand Down
2 changes: 1 addition & 1 deletion src/Event/ConfigFormEventBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(FormStateInterface $form_state = NULL) {
}

/**
* Accessor for the form state.
* Getter for the form state.
*
* @return Drupal\Core\Form\FormStateInterface
* The form state.
Expand Down
2 changes: 1 addition & 1 deletion src/Event/QuantEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class QuantEvent extends Event {
/**
* Allow modules to hook into the transport event.
*
* This allows modules to redirect the outupt to different storage
* This allows modules to redirect the output to different storage
* locations.
*
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Event/QuantFileEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class QuantFileEvent extends Event {
/**
* Allow modules to hook into the transport event.
*
* This allows modules to redirect the outupt to different storage
* This allows modules to redirect the output to different storage
* locations.
*
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Event/QuantRedirectEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class QuantRedirectEvent extends Event {
/**
* Allow modules to hook into the transport event.
*
* This allows modules to redirect the outupt to different storage
* This allows modules to redirect the output to different storage
* locations.
*
* @var string
Expand Down
4 changes: 2 additions & 2 deletions src/EventSubscriber/CollectionSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Drupal\redirect\Entity\Redirect;

/**
* Event subscribers for the quant collection events.
* Event subscribers for the Quant collection events.
*/
class CollectionSubscriber implements EventSubscriberInterface {

Expand Down Expand Up @@ -214,7 +214,7 @@ private function collectThemeFiles($event) {
}

/**
* Collect files for quant seeding.
* Collect files for Quant seeding.
*/
public function collectFiles(CollectFilesEvent $event) {

Expand Down
4 changes: 2 additions & 2 deletions src/Form/ConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['local_server'] = [
'#type' => 'textfield',
'#title' => $this->t('Webserver URL'),
'#description' => $this->t('Provide the FQDN for the local webserver. e.g: <em>http://localhost</em>, <em>http://nginx:8080</em> or <em>http://127.0.0.1</em>. <a href="https://docs.quantcdn.io/docs/integrations/drupal#setup">More info.</a>'),
'#description' => $this->t('Provide the fully-qualified domain name for the local webserver. e.g: <em>http://localhost</em>, <em>http://nginx:8080</em> or <em>http://127.0.0.1</em>. <a href="https://docs.quantcdn.io/docs/integrations/drupal#setup">More info.</a>'),
'#default_value' => $config->get('local_server') ?: 'http://localhost',
'#required' => TRUE,
];
Expand Down Expand Up @@ -201,7 +201,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
* Checks the Quant validation route for an expected response.
*
* @return bool
* If quant can connect to local webserver or not.
* If Quant can connect to local webserver or not.
*/
private function checkValidationRoute() {

Expand Down
4 changes: 2 additions & 2 deletions src/Form/SeedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['lunr'] = [
'#type' => 'checkbox',
'#title' => 'Lunr search assets',
'#description' => $this->t('Exports required lunr javascript libraries and all search indexes for decoupled search.'),
'#description' => $this->t('Exports required Lunr JavaScript libraries and all search indexes for decoupled search.'),
'#default_value' => $seed_config->get('lunr'),
];
}
Expand Down Expand Up @@ -354,7 +354,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {

// Lunr.
if ($form_state->getValue('lunr')) {
// @todo Sub-module for lunr support using the events.
// @todo Submodule for Lunr support using the events.
$assets = array_merge($assets, Seed::findLunrAssets());
$routes = array_merge($routes, Seed::findLunrRoutes());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/MetadataBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function defaultConfiguration() {
/**
* Build a configuration form.
*
* This allows some quant metadata plugins to accept configuration
* This allows some Quant metadata plugins to accept configuration
* values.
*
* @return array
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/QueueItem/FileItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Drupal\quant\Event\QuantFileEvent;

/**
* A quant queue file item.
* A Quant queue file item.
*
* @ingroup quant
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/QueueItem/RouteItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Drupal\quant\Seed;

/**
* A quant queue item for a redirect.
* A Quant queue item for a redirect.
*
* @ingroup quant
*/
Expand Down
2 changes: 1 addition & 1 deletion src/QuantQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class QuantQueue extends DatabaseQueue {
public const TABLE_NAME = 'quant_queue';

/**
* Length of the hash coulmn.
* Length of the hash column.
*/
public const HASH_LENGTH = 48;

Expand Down