diff --git a/src/content/docs/en/reference/error-reference.mdx b/src/content/docs/en/reference/error-reference.mdx index 643b62362a2cb..61bff64b812d2 100644 --- a/src/content/docs/en/reference/error-reference.mdx +++ b/src/content/docs/en/reference/error-reference.mdx @@ -73,7 +73,9 @@ The following reference is a complete list of the errors you may encounter while - [**FailedToFindPageMapSSR**](/en/reference/errors/failed-to-find-page-map-ssr/)
Astro couldn't find the correct page to render - [**MissingLocale**](/en/reference/errors/missing-locale/)
The provided locale does not exist. - [**MissingIndexForInternationalization**](/en/reference/errors/missing-index-for-internationalization/)
Index page not found. +- [**IncorrectStrategyForI18n**](/en/reference/errors/incorrect-strategy-for-i18n/)
You can't use the current function with the current strategy - [**NoPrerenderedRoutesWithDomains**](/en/reference/errors/no-prerendered-routes-with-domains/)
Prerendered routes aren't supported when internationalization domains are enabled. +- [**MissingMiddlewareForInternationalization**](/en/reference/errors/missing-middleware-for-internationalization/)
Enabled manual internationalization routing without having a middleware. - [**CantRenderPage**](/en/reference/errors/cant-render-page/)
Astro can't render the route. - [**UnhandledRejection**](/en/reference/errors/unhandled-rejection/)
Unhandled rejection - [**i18nNotEnabled**](/en/reference/errors/i18n-not-enabled/)
i18n Not Enabled diff --git a/src/content/docs/en/reference/errors/incorrect-strategy-for-i18n.mdx b/src/content/docs/en/reference/errors/incorrect-strategy-for-i18n.mdx new file mode 100644 index 0000000000000..a4e4bb9502484 --- /dev/null +++ b/src/content/docs/en/reference/errors/incorrect-strategy-for-i18n.mdx @@ -0,0 +1,24 @@ +--- +# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' +# Do not make edits to it directly, they will be overwritten. +# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +# Translators, please remove this note and the component. + +title: You can't use the current function with the current strategy +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- +import DontEditWarning from '~/components/DontEditWarning.astro' + + + + +> **IncorrectStrategyForI18n**: The function `FUNCTION_NAME\' can only be used when the `i18n.routing.strategy` is set to `"manual"`. + +## What went wrong? +Some internationalization functions are only available when Astro's own i18n routing is disabled by the configuration setting `i18n.routing: "manual"`. + +**See Also:** +- [`i18n` routing](/en/guides/internationalization/#routing) + + diff --git a/src/content/docs/en/reference/errors/missing-middleware-for-internationalization.mdx b/src/content/docs/en/reference/errors/missing-middleware-for-internationalization.mdx new file mode 100644 index 0000000000000..a6284689d6a88 --- /dev/null +++ b/src/content/docs/en/reference/errors/missing-middleware-for-internationalization.mdx @@ -0,0 +1,22 @@ +--- +# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' +# Do not make edits to it directly, they will be overwritten. +# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +# Translators, please remove this note and the component. + +title: Enabled manual internationalization routing without having a middleware. +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- +import DontEditWarning from '~/components/DontEditWarning.astro' + + + + +> **MissingMiddlewareForInternationalization**: Your configuration setting `i18n.routing: 'manual'` requires you to provide your own i18n `middleware` file. + +## What went wrong? +Astro throws an error if the user enables manual routing, but it doesn't have a middleware file. + + + diff --git a/src/content/docs/en/reference/errors/no-prerendered-routes-with-domains.mdx b/src/content/docs/en/reference/errors/no-prerendered-routes-with-domains.mdx index 668b4329f61e8..00deb22391210 100644 --- a/src/content/docs/en/reference/errors/no-prerendered-routes-with-domains.mdx +++ b/src/content/docs/en/reference/errors/no-prerendered-routes-with-domains.mdx @@ -13,7 +13,7 @@ import DontEditWarning from '~/components/DontEditWarning.astro' -> **NoPrerenderedRoutesWithDomains**: Static pages aren't yet supported with multiple domains. If you wish to enable this feature, you have to disable prerendering for the page COMPONENT +> **NoPrerenderedRoutesWithDomains**: Static pages aren't yet supported with multiple domains. To enable this feature, you must disable prerendering for the page COMPONENT ## What went wrong? Static pages aren't yet supported with i18n domains. If you wish to enable this feature, you have to disable prerendering.