Skip to content

Commit 26e262e

Browse files
authored
Fix typos
1 parent d53da50 commit 26e262e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/localization.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Localization Architecture
22

3-
An important feature of the p5.js website is support multiple languages (four and counting!). This requires the website to build and serve every page in each of the supported languages.
3+
An important feature of the p5.js website is its support for multiple languages (four and counting!). This requires the website to build and serve every page in each of the supported languages.
44

55
Our website framework Astro has localization support, but it doesn't cover our full set of needs so the localization tooling in this repo is largely [hand rolled](https://www.quora.com/Computer-Science-Where-did-the-phrase-Roll-your-own-come-from-and-why-is-it-used-in-CS).
66

@@ -29,7 +29,7 @@ Taking the tutorials page as an example:
2929

3030
Both of these routes use the [TutorialsLayout](/src/layouts/TutorialsLayout.astro) to render the page by passing in the content in the correct language.
3131

32-
The main difference between these two routing files is how they retrieve the correct translation. The English version retreives the English version of the content. The other translations retrieve their version of the content and then fill in any gaps with English versions. See `getCollectionInLocaleWithFallbacks()` for how this works.
32+
The main difference between these two routing files is how they retrieve the correct translation. The English version retrieves the English version of the content. The other translations retrieve their version of the content and then fill in any gaps with English versions. See `getCollectionInLocaleWithFallbacks()` for how this works.
3333

3434
Because of this subtle duplication, we try to keep the files in `src/pages/` as short as possible and move rendering logic into the [layout files](/src/layouts/).
3535

@@ -89,7 +89,7 @@ const uiTranslations = await getUiTranslationWithFallback(currentLocale);
8989
9090
```
9191

92-
And then in the HelloButton Preact component, we acess the translations using object keys:
92+
And then in the HelloButton Preact component, we access the translations using object keys:
9393

9494
```jsx
9595
export const HelloButton = (props) => {
@@ -98,7 +98,7 @@ export const HelloButton = (props) => {
9898
};
9999
```
100100

101-
Essentially, the arguments you would pass to `t` in the first example for astro files are the same you would pass as keys to the `uiTranslations` object. If its a nested key, that looks like:
101+
Essentially, the arguments you would pass to `t` in the first example for astro files are the same you would pass as keys to the `uiTranslations` object. If it's a nested key, that looks like:
102102

103103
```jsx
104104
uiTranslations["sectionTitles"]["main"];

0 commit comments

Comments
 (0)