Skip to content

Commit

Permalink
Fix typos (#10923)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed May 1, 2024
1 parent 1b7ed7a commit a146cf1
Show file tree
Hide file tree
Showing 52 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion benchmark/make-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

This `make-project` folder contains different files to programmatically create a new Astro project. They are created inside the `projects` folder and are gitignored. These projects are used by benchmarks for testing.

Each benchmark can specify the default project to run in its `defaultProject` export, but it can be overriden if `--project <project-name>` is passed through the CLI.
Each benchmark can specify the default project to run in its `defaultProject` export, but it can be overridden if `--project <project-name>` is passed through the CLI.

You can duplicate `_template.js` to start a new project script. All shared utilities are kept in `_util.js`.
2 changes: 1 addition & 1 deletion examples/blog/src/content/blog/markdown-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The blockquote element represents content that is quoted from another source, op

#### Syntax

we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntac, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash
we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntax, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash

````markdown
```html
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ hr {
clip: rect(1px, 1px, 1px, 1px);
/* modern browsers, clip-path works inwards from each corner */
clip-path: inset(50%);
/* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
/* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
white-space: nowrap;
}
2 changes: 1 addition & 1 deletion examples/hackernews/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function fetchAPI(path: string) {
}
return JSON.parse(text);
} catch (e) {
console.error(`Recevied from API: ${text}`);
console.error(`Received from API: ${text}`);
console.error(e);
return { error: e };
}
Expand Down
2 changes: 1 addition & 1 deletion examples/view-transitions/src/scripts/spa-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from './utils';

// View Transitions support cross-document navigations.
// Should compare performace.
// Should compare performance.
// https://github.com/WICG/view-transitions/blob/main/explainer.md#cross-document-same-origin-transitions
// https://github.com/WICG/view-transitions/blob/main/explainer.md#script-events
function shouldDisableSpa() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
fully-poseable action figurine comes equipped with:
</p>
<ul>
<li>A fabric space suit with adjustible straps</li>
<li>A fabric space suit with adjustable straps</li>
<li>Boots lightly dusted by the lunar surface *</li>
<li>An adjustable space visor</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/dev-toolbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ test.describe('Dev Toolbar', () => {
await expect(xrayWindow.locator('astro-dev-toolbar-icon[icon=lightbulb]')).toBeVisible();
});

test('audit shows higlights and tooltips', async ({ page, astro }) => {
test('audit shows highlights and tooltips', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/'));

const toolbar = page.locator('astro-dev-toolbar');
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/i18n/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
"fr",
"es",
{
path: "portugues",
path: "portuguese",
codes: [
"pt-AO",
"pt",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/i18n/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import { getLocaleByPath } from "astro:i18n";

<p>Locale: {getLocaleByPath("en")}</p> <!-- will log "en" -->
<p>Locale: {getLocaleByPath("fr")}</p> <!-- will log "fr" -->
<p>Locale: {getLocaleByPath("portugues")}</p> <!-- will log "pt-AO" -->
<p>Locale: {getLocaleByPath("portuguese")}</p> <!-- will log "pt-AO" -->
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ViewTransitions } from 'astro:transitions';
// For the test fixture, we import the script but we don't use the <ViewTransitions /> component
// While this seems to be some strange mistake,
// it might be realistic, e.g. in a configurable CommenHead component
// it might be realistic, e.g. in a configurable CommentHead component
interface Props {
transitions?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Layout from '../components/Layout.astro';
<div id="twelve" transition:name="#! /">#! /</div>
<div id="thirteen" transition:name="_01__02___">_01__02___</div>
<div id="batch0" transition:name="\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f">control chars</div>
<div id="batch1" transition:name="\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f">punctation &amp; numbers</div>
<div id="batch1" transition:name="\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f">punctuation &amp; numbers</div>
<div id="batch2" transition:name="\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f">upper case chars</div>
<div id="batch3" transition:name="\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f">lower case chars</div>
<div id="batch4" transition:name="\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f">80-9f</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/astro/e2e/view-transitions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ test.describe('View Transitions', () => {
await expect(h, 'should be absent').not.toHaveAttribute('class', /.*/);
});

test('Link with data-astro-reload attribute should trigger page load, no tranistion', async ({
test('Link with data-astro-reload attribute should trigger page load, no transition', async ({
page,
astro,
}) => {
Expand Down Expand Up @@ -728,7 +728,7 @@ test.describe('View Transitions', () => {
let locator = page.locator('#click-external');
await expect(locator).toBeInViewport();

// Go to a page that has not enabled ViewTransistions
// Go to a page that has not enabled ViewTransitions
await page.click('#click-external');
locator = page.locator('#three');
await expect(locator).toHaveText('Page 3');
Expand Down Expand Up @@ -920,7 +920,7 @@ test.describe('View Transitions', () => {
test('Use the client side router in framework components', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/client-load'));

// the button is set to naviagte() to /two
// the button is set to navigate() to /two
const button = page.locator('#react-client-load-navigate-button');

await expect(button, 'should have content').toHaveText('Navigate to `/two`');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function extractOrientation(exifBlock: Uint8Array, isBigEndian: boolean) {
return
}

// unsinged int has 2 bytes per component
// unsigned int has 2 bytes per component
// if there would more than 4 bytes in total it's a pointer
const numberOfComponents = readUInt(block, 32, 4, isBigEndian)
if (numberOfComponents !== 1) {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/cli/preferences/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const chars = {
bottomRight: '╯',
};

// this is only used to deternine the column width
// this is only used to determine the column width
function annotatedFormat(mv: AnnotatedValue) {
return mv.annotation ? `${mv.value} ${mv.annotation}` : mv.value.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export async function generateLookupMap({
);

// Run 10 at a time to prevent `await getEntrySlug` from accessing the filesystem all at once.
// Each await shouldn't take too long for the work to be noticably slow too.
// Each await shouldn't take too long for the work to be noticeably slow too.
const limit = pLimit(10);
const promises: Promise<void>[] = [];

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class BuildPipeline extends Pipeline {
// We retrieve the original JS module
const filePath = this.internals.entrySpecifierToBundleMap.get(moduleSpecifier);
if (filePath) {
// it exists, added it to pages to render, using the file path that we jus retrieved
// it exists, added it to pages to render, using the file path that we just retrieved
pages.set(pageData, filePath);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/compile/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function compile({
normalizedFilename: normalizeFilename(filename, astroConfig.root),
sourcemap: 'both',
internalURL: 'astro/compiler-runtime',
// TODO: this is no longer neccessary for `Astro.site`
// TODO: this is no longer necessary for `Astro.site`
// but it somehow allows working around caching issues in content collections for some tests
astroGlobalArgs: JSON.stringify(astroConfig.site),
scopedStyleStrategy: astroConfig.scopedStyleStrategy,
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const REROUTABLE_STATUS_CODES = [404, 500];

/**
* The symbol which is used as a field on the request object to store the client address.
* The clientAddresss provided by the adapter (or the dev server) is stored on this field.
* The clientAddress provided by the adapter (or the dev server) is stored on this field.
*/
export const clientAddressSymbol = Symbol.for('astro.clientAddress');

Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/core/errors/errors-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ export const NoMatchingImport = {
export const InvalidPrerenderExport = {
name: 'InvalidPrerenderExport',
title: 'Invalid prerender export.',
message(prefix: string, suffix: string, isHydridOuput: boolean) {
const defaultExpectedValue = isHydridOuput ? 'false' : 'true';
message(prefix: string, suffix: string, isHydridOutput: boolean) {
const defaultExpectedValue = isHydridOutput ? 'false' : 'true';
let msg = `A \`prerender\` export has been detected, but its value cannot be statically analyzed.`;
if (prefix !== 'const') msg += `\nExpected \`const\` declaration but got \`${prefix}\`.`;
if (suffix !== 'true')
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/core/errors/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const style = /* css */ `
/* Theme toggle */
--toggle-ball-color: var(--accent);
--toggle-tabel-background: var(--background);
--toggle-table-background: var(--background);
--sun-icon-color: #ffffff;
--moon-icon-color: #a3acc8;
--toggle-border-color: #C3CADB;
Expand Down Expand Up @@ -150,7 +150,7 @@ const style = /* css */ `
}
#theme-toggle-label {
background-color: var(--toggle-tabel-background);
background-color: var(--toggle-table-background);
border-radius: 50px;
cursor: pointer;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/routing/priority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { RouteData } from '../../@types/astro.js';
* - Prerendered routes are sorted before non-prerendered routes.
* - Endpoints are sorted before pages.
* For example, a file `/foo.ts` is sorted before `/bar.astro`.
* - If both routes are equal regarding all previosu conditions, they are sorted alphabetically.
* - If both routes are equal regarding all previous conditions, they are sorted alphabetically.
* For example, `/bar` is sorted before `/foo`.
* The definition of "alphabetically" is dependent on the default locale of the running system.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/prefetch/vite-plugin-prefetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function astroPrefetch({ settings }: { settings: AstroSettings })
},
transform(code, id) {
// NOTE: Handle replacing the specifiers even if prefetch is disabled so View Transitions
// can import the interal module as not hit runtime issues.
// can import the internal module as not hit runtime issues.
if (id.includes(prefetchInternalModuleFsSubpath)) {
return code
.replace('__PREFETCH_PREFETCH_ALL__', JSON.stringify(prefetch?.prefetchAll))
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/prerender/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getPrerenderDefault(config: AstroConfig) {
}

/**
* Returns the correct output directory of hte SSR build based on the configuration
* Returns the correct output directory of the SSR build based on the configuration
*/
export function getOutputDirectory(config: AstroConfig): URL {
const ssr = isServerLikeOutput(config);
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/astro-global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function createAstroGlobFn() {
// inside of getStaticPaths. See the `astroGlobalArgs` option for parameter type.
export function createAstro(site: string | undefined): AstroGlobalPartial {
return {
// TODO: this is no longer neccessary for `Astro.site`
// TODO: this is no longer necessary for `Astro.site`
// but it somehow allows working around caching issues in content collections for some tests
site: site ? new URL(site) : undefined,
generator: `Astro v${ASTRO_VERSION}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function reEncode(s: string) {
// we replace it with its hex value escaped by an underscore for decodability (and better readability,
// because most of them are punctuations like ,'"":;_..., and '_' might be a better choice than '-')
// The underscore itself (code 95) is also escaped and encoded as two underscores to avoid
// collitions between original and encoded strings.
// collisions between original and encoded strings.
// All other values are just copied over
result +=
codepoint < 0x80
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ async function transition(
options: Options,
historyState?: State
) {
// The most recent navigation always has precendence
// The most recent navigation always has precedence
// Yes, there can be several navigation instances as the user can click links
// while we fetch content or simulate view transitions. Even synchronous creations are possible
// e.g. by calling navigate() from an transition event.
Expand Down Expand Up @@ -666,7 +666,7 @@ async function transition(
// Scripts that depend on the view transition pseudo elements should hook on viewTransition.ready.
await currentTransition.viewTransition.updateCallbackDone;
} catch (e) {
// This log doesn't make it worse than before, where we got error messages about uncaught exceptions, which can't be catched when the trigger was a click or history traversal.
// This log doesn't make it worse than before, where we got error messages about uncaught exceptions, which can't be caught when the trigger was a click or history traversal.
// Needs more investigation on root causes if errors still occur sporadically
const err = e as Error;
console.log('[astro]', err.name, err.message, err.stack);
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/vite-plugin-astro-server/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function* crawlGraph(
// Needed for slower CSS preprocessing like Tailwind
loader.getModulesByFile(id) ?? new Set()
: // For non-root files, we're safe to pull from "getModuleById" based on testing.
// TODO: Find better invalidation strat to use "getModuleById" in all cases!
// TODO: Find better invalidation strategy to use "getModuleById" in all cases!
new Set([loader.getModuleById(id)]);

// Collect all imported modules for the module(s).
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/astro-css-bundling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';

// note: the hashes should be deterministic, but updating the file contents will change hashes
// be careful not to test that the HTML simply contains CSS, because it always will! filename and quanity matter here (bundling).
// be careful not to test that the HTML simply contains CSS, because it always will! filename and quantity matter here (bundling).
const EXPECTED_CSS = {
'/index.html': ['/_astro/'], // don’t match hashes, which change based on content
'/one/index.html': ['/_astro/'],
Expand Down
12 changes: 6 additions & 6 deletions packages/astro/test/astro-slots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ describe('Slots', () => {
it('Arguments can be passed to named slots with Astro.slots.render()', async () => {
const html = await fixture.readFile('/slotted-named-functions/index.html');
const $ = cheerio.load(html);
const befor = $('div#before');
const [beforeDiv] = befor.children('div');
assert.deepEqual(beforeDiv.firstChild.data, 'Test Content BEFORE');
const after = $('div#after');
const [afterDiv] = after.children('div');
assert.deepEqual(afterDiv.firstChild.data, 'Test Content AFTER');
const beforeDiv = $('div#before');
const [beforeChildren] = beforeDiv.children('div');
assert.deepEqual(beforeChildren.firstChild.data, 'Test Content BEFORE');
const afterDiv = $('div#after');
const [afterChildren] = afterDiv.children('div');
assert.deepEqual(afterChildren.firstChild.data, 'Test Content AFTER');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ describe('Experimental Content Collections cache', () => {
});

describe('With empty collections directory', () => {
it('Handles the empty directory correclty', async () => {
it('Handles the empty directory correctly', async () => {
const fixture = await loadFixture({
root: './fixtures/content-collections-empty-dir/',
experimental: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
const content = 'Test Content';
const beforeConent = await Astro.slots.render("before", [{content}])
const afterConent = await Astro.slots.render("after", [{content}])
const beforeContent = await Astro.slots.render("before", [{content}])
const afterContent = await Astro.slots.render("after", [{content}])
---
<div id="before">
{beforeConent}
{beforeContent}
</div>
<div id="after">
{afterConent}
{afterContent}
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function getStaticPaths() {
},
{
slug: "products/astro-handbook",
title: "The ultimative Astro handbook",
title: "The ultimate Astro handbook",
text: "If you want to learn Astro, you must read this book.",
},
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<head><title>Not Found</title></head>
<body>Can't find the page youre looking for.</body>
<body>Can't find the page you're looking for.</body>
</html>
4 changes: 2 additions & 2 deletions packages/astro/test/fixtures/markdown/src/pages/realworld.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ By looping through the same repeater, we can get all the tabs out of the databas

There are a number of ways to do this. I could ask the user to input a number to uniquely identify the tab pane. But that would add extra work to the users flow, and they might easily find themselves out of their depth. I want to make this as easy as possible for the user.

On the other hand, Wordpress has a very useful function called Sanitize HTML, which we input the value of the title, take out spaces and capitals, and use this as the link:
On the other hand, WordPress has a very useful function called Sanitize HTML, which we input the value of the title, take out spaces and capitals, and use this as the link:

```php
<a href="#<?php echo sanitize_html_class( the_sub_field( 'tab_title' ) ); ?>"
Expand Down Expand Up @@ -112,6 +112,6 @@ The final thing to do, is to keep the counter running, but adding this just befo

Once you've added these to the tab panes in a similar way, you'll be up and running with Bootstrap Tabs.

Below is a Github Gist, with the complete code for reference. [Link to this (if you can't see the iFrame)](https://gist.github.com/endymion1818/478d86025f41c8060888 "Github GIST for Advanced Custom Fields bootstrap tabs").
Below is a GitHub Gist, with the complete code for reference. [Link to this (if you can't see the iFrame)](https://gist.github.com/endymion1818/478d86025f41c8060888 "GitHub GIST for Advanced Custom Fields bootstrap tabs").

<script src="https://gist.github.com/endymion1818/478d86025f41c8060888.js"></script>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Slot from '../../components/Slot.astro';
<html>
<body>
<h3>Bug: Astro.slots.render() with arguments does not work with &lt;Fragment&gt; slot</h3>
<p>Comment out working example and uncomment non working exmaples</p>
<p>Comment out working example and uncomment non working examples</p>
<hr>

<Slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Img from '../components/Img.vue'
<!-- Test island deduplication account for non-render affecting props. -->
<Counter start="1" step-size="2" client:load>SSR Rendered, client:load</Counter>
<Counter start="10" client:idle>SSR Rendered, client:idle</Counter>
<!-- Test that two client:visibles have unique uids -->
<!-- Test that two client:visible have unique uids -->
<Counter start="100" client:visible>SSR Rendered, client:visible</Counter>
<Counter start="1000" client:visible>SSR Rendered, client:visible</Counter>
<Img />
Expand Down
Loading

0 comments on commit a146cf1

Please sign in to comment.