Skip to content

Commit

Permalink
docs: fix typos (#2990)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede authored Jun 25, 2024
1 parent de9d954 commit 8f43da4
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/content/docs/2.guide/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Nuxt i18n module overrides Nuxt default routes to add locale prefix
---

::callout{icon="i-heroicons-light-bulb"}
This feature works under [nuxt routing](https://nuxt.com/docs/getting-started/routing). It's assumed that you are using the `pages` directory to control routing.
This feature works under [Nuxt routing](https://nuxt.com/docs/getting-started/routing). It's assumed that you are using the `pages` directory to control routing.
::

## Routing
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/2.guide/15.server-side-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Example:
```ts
// you need to define `async` event handler
export default defineEventHandler(async event => {
// call `useTranslation`, so it retrun the translation function
// call `useTranslation`, so it return the translation function
const t = await useTranslation(event)
return {
// call translation function with key of locale messages,
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/2.guide/3.custom-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Custom Route Paths
description: Customize the names of the paths for specific locale.
---

In some cases, you might want to translate URLs in addition to having them prefixed with the locale code. There are 2 ways of configuring custom paths for your [Module configuration](#nodule-configuration) or your pages [Page component](#page-component).
In some cases, you might want to translate URLs in addition to having them prefixed with the locale code. There are 2 ways of configuring custom paths for your [Module configuration](#module-configuration) or your pages [Page component](#page-component).

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
Custom paths are not supported when using the `no-prefix` [strategy](/docs/guide).
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/2.guide/7.lazy-load-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ For example, let’s take the case of supporting the Spanish language. According

If these countries are all configured using `file`, it would be difficult to maintain due to the duplication of locale messages for each country.

In this scenario, it would be easier to keep all shared (common) locale messages for the target language in a seperate file and define dialectal variations for each country seperately is well to prevent duplication, which is easier to maintain.
In this scenario, it would be easier to keep all shared (common) locale messages for the target language in a separate file and define dialectal variations for each country separately is well to prevent duplication, which is easier to maintain.

The following is an example of a lang directory containing locale files for the Spanish language:

Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/4.api/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default defineI18nConfig(() => ({

#### `loader`

A function that is the vue-i18n optionss loading.
A function that is the vue-i18n options loading.

## `defineI18nLocale`

Expand Down Expand Up @@ -389,7 +389,7 @@ export default defineI18nLocaleDetector((event, config) => {
})
```

In the locale detector function, you can use [`@intlify/h3` utilites](https://github.com/intlify/h3#%EF%B8%8F-utilites--helpers), these are auto imported.
In the locale detector function, you can use [`@intlify/h3` utilities](https://github.com/intlify/h3#%EF%B8%8F-utilites--helpers), these are auto imported.

### Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/5.v7/10.seo.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default {
Generates `rel="canonical"` link on all pages to specify the "main" version of the page that should be indexed by search engines. This is beneficial in various situations:

- When using the `prefix_and_default` strategy there are technically two sets of pages generated for the default locale -- one prefixed and one unprefixed. The canonical link will be set to the unprefixed version of the page to avoid duplicate indexation.
- When the page contains query parameters, the canonical link will **not include** the query params by default. This is typically the right thing to do as various query params can be inserted by trackers and should not be part of the canonical link. This can be overriden by using the `canonicalQueries` option. For example:
- When the page contains query parameters, the canonical link will **not include** the query params by default. This is typically the right thing to do as various query params can be inserted by trackers and should not be part of the canonical link. This can be overridden by using the `canonicalQueries` option. For example:

```js
export default {
Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/5.v7/16.extend-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export default function () {
nuxt.hook('i18n:extend-messages', function (additionalMessages) {
additionalMessages.push({
en: {
'my-module-exemple': {
'my-module-example': {
hello: 'Hello from external module'
}
},
fr: {
'my-module-exemple': {
'my-module-example': {
hello: 'Bonjour depuis le module externe'
}
}
Expand All @@ -32,7 +32,7 @@ export default function () {
}
```

Now the project has access to new messages and can use them through `$t('my-module-exemple.hello')`.
Now the project has access to new messages and can use them through `$t('my-module-example.hello')`.

::callout{icon="i-heroicons-light-bulb"}
Because module's messages are merged with the project's ones, it's safer to prefix them. Main project messages **will always override** the module's ones.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/5.v7/17.migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ See also [SEO Guide](./seo) for more details.

### `$nuxtI18nSeo` has been removed

The `$nuxtI18nSeo()` function that was used to generate meta information to be used wihtin the Nuxt's `head` component option has been removed.
The `$nuxtI18nSeo()` function that was used to generate meta information to be used within the Nuxt's `head` component option has been removed.

If you have been using `$nuxtI18nSeo` in your code, replace it with `$nuxtI18nHead({ addSeoAttributes: true })`.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/5.v7/8.ignoring-localized-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Ignoring Localized Routes
This feature is not supported with the `no-prefix` [strategy](./strategies).
::

If you'd like some pages to be available in some languages only, you can configure the list of supported languages to override the global settings. The options can be specified within either the page components themselves or globaly, within then module options.
If you'd like some pages to be available in some languages only, you can configure the list of supported languages to override the global settings. The options can be specified within either the page components themselves or globally, within then module options.

### Pick localized routes

Expand Down

0 comments on commit 8f43da4

Please sign in to comment.