diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.yml b/.github/ISSUE_TEMPLATE/01_bug_report.yml index 362d9451b..3720d6bed 100644 --- a/.github/ISSUE_TEMPLATE/01_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -23,11 +23,11 @@ body: attributes: label: Verifications options: - - label: I've verified that the problem I'm experiencing isn't covered in [the docs](https://next-intl-docs.vercel.app/). + - label: I've verified that the problem I'm experiencing isn't covered in [the docs](https://next-intl.dev). required: true - label: I've searched for similar, existing issues on [GitHub](https://github.com/amannn/next-intl/issues) and [Stack Overflow](https://stackoverflow.com/search?q=next-intl). required: true - - label: I've compared my app to [a working example](https://next-intl-docs.vercel.app/examples) to look for differences. + - label: I've compared my app to [a working example](https://next-intl.dev/examples) to look for differences. required: true - type: input attributes: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 80508a6ec..5f24e95f8 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,7 +1,7 @@ blank_issues_enabled: false contact_links: - name: View documentation - url: https://next-intl-docs.vercel.app/ + url: https://next-intl.dev about: Check out the official docs for answers to common questions - name: Get community support url: https://stackoverflow.com/questions/ask diff --git a/README.md b/README.md index 351228122..7440aa747 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@


- + @@ -29,10 +29,10 @@ Internationalization (i18n) is an essential part of the user experience, therefo ```jsx // UserProfile.tsx import {useTranslations} from 'next-intl'; - + export default function UserProfile({user}) { const t = useTranslations('UserProfile'); - + return (

{t('title', {firstName: user.firstName})}

@@ -58,10 +58,10 @@ export default function UserProfile({user}) { } ``` -### [→ Read the docs](https://next-intl-docs.vercel.app/) +### [→ Read the docs](https://next-intl.dev)
- + Crowdin logo
diff --git a/examples/example-app-router-mixed-routing/README.md b/examples/example-app-router-mixed-routing/README.md index 35a925e4a..452f94929 100644 --- a/examples/example-app-router-mixed-routing/README.md +++ b/examples/example-app-router-mixed-routing/README.md @@ -4,8 +4,8 @@ An example of how to achieve locale prefixes on public routes while reading the **Relevant docs:** -1. [Setting up `next-intl` with i18n routing](https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing) -2. [Setting up `next-intl` without i18n routing](https://next-intl-docs.vercel.app/docs/getting-started/app-router/without-i18n-routing) +1. [Setting up `next-intl` with i18n routing](https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing) +2. [Setting up `next-intl` without i18n routing](https://next-intl.dev/docs/getting-started/app-router/without-i18n-routing) **Relevant parts in app code:** diff --git a/examples/example-app-router-next-auth/README.md b/examples/example-app-router-next-auth/README.md index 1d452a452..91a07ee70 100644 --- a/examples/example-app-router-next-auth/README.md +++ b/examples/example-app-router-next-auth/README.md @@ -4,7 +4,7 @@ An example that showcases the usage of `next-intl` together with Auth.js and the **Credentials**: admin / admin -See [the corresponding docs for this example](https://next-intl-docs.vercel.app/docs/routing/middleware#example-auth-js). +See [the corresponding docs for this example](https://next-intl.dev/docs/routing/middleware#example-auth-js). ## Deploy your own diff --git a/examples/example-app-router-without-i18n-routing/README.md b/examples/example-app-router-without-i18n-routing/README.md index 5e636d502..76b07aec2 100644 --- a/examples/example-app-router-without-i18n-routing/README.md +++ b/examples/example-app-router-without-i18n-routing/README.md @@ -1,6 +1,6 @@ # example-app-router-without-i18n-routing -An example that showcases how an app can provide a locale in `i18n.ts` to `next-intl` in an App Router setup ([without i18n routing setup](https://next-intl-docs.vercel.app/docs/getting-started/app-router/without-i18n-routing)). +An example that showcases how an app can provide a locale in `i18n.ts` to `next-intl` in an App Router setup ([without i18n routing setup](https://next-intl.dev/docs/getting-started/app-router/without-i18n-routing)). This app uses Server Actions in two places: diff --git a/examples/example-app-router/messages/de.json b/examples/example-app-router/messages/de.json index 7533cf4eb..5d873e339 100644 --- a/examples/example-app-router/messages/de.json +++ b/examples/example-app-router/messages/de.json @@ -30,7 +30,7 @@ "links": { "docs": { "description": "Erfahre mehr über next-intl in der offiziellen Dokumentation.", - "href": "https://next-intl-docs.vercel.app/", + "href": "https://next-intl.dev", "title": "Dokumentation" }, "source": { diff --git a/examples/example-app-router/messages/en.json b/examples/example-app-router/messages/en.json index 12d30d856..0dd025ec1 100644 --- a/examples/example-app-router/messages/en.json +++ b/examples/example-app-router/messages/en.json @@ -29,7 +29,7 @@ "links": { "docs": { "description": "Learn more about next-intl in the official docs.", - "href": "https://next-intl-docs.vercel.app/", + "href": "https://next-intl.dev", "title": "Docs" }, "source": { diff --git a/examples/example-pages-router-advanced/src/pages/about.tsx b/examples/example-pages-router-advanced/src/pages/about.tsx index 671c91329..c14fc676a 100644 --- a/examples/example-pages-router-advanced/src/pages/about.tsx +++ b/examples/example-pages-router-advanced/src/pages/about.tsx @@ -31,7 +31,7 @@ export async function getServerSideProps({locale}: GetServerSidePropsContext) { ), // Note that when `now` is passed to the app, you need to make sure the // value is updated from time to time, so relative times are updated. See - // https://next-intl-docs.vercel.app/docs/usage/configuration#global-now-value + // https://next-intl.dev/docs/usage/configuration#global-now-value now: new Date().getTime() } }; diff --git a/examples/example-react-native/README.md b/examples/example-react-native/README.md index f4f7768e8..fac07ae6c 100644 --- a/examples/example-react-native/README.md +++ b/examples/example-react-native/README.md @@ -2,7 +2,7 @@ An example that showcases the usage of `use-intl` with React Native. -Please double check that [the runtime requirements](https://next-intl-docs.vercel.app/docs/environments/runtime-requirements) are fulfilled. +Please double check that [the runtime requirements](https://next-intl.dev/docs/environments/runtime-requirements) are fulfilled. ``` pnpm install diff --git a/media/assets.sketch b/media/assets.sketch index caab38464..4fec67162 100644 Binary files a/media/assets.sketch and b/media/assets.sketch differ diff --git a/packages/next-intl/.size-limit.ts b/packages/next-intl/.size-limit.ts index 94f0cf398..697f81bb9 100644 --- a/packages/next-intl/.size-limit.ts +++ b/packages/next-intl/.size-limit.ts @@ -39,13 +39,13 @@ const config: SizeLimitConfig = [ name: "import {createLocalizedPathnamesNavigation} from 'next-intl/navigation' (react-server)", path: 'dist/production/navigation.react-server.js', import: '{createLocalizedPathnamesNavigation}', - limit: '16.785 KB' + limit: '16.805 KB' }, { name: "import {createNavigation} from 'next-intl/navigation' (react-server)", path: 'dist/production/navigation.react-server.js', import: '{createNavigation}', - limit: '16.8 KB' + limit: '16.805 KB' }, { name: "import * from 'next-intl/server' (react-client)", diff --git a/packages/next-intl/package.json b/packages/next-intl/package.json index 9fde6c5f2..084d2f4db 100644 --- a/packages/next-intl/package.json +++ b/packages/next-intl/package.json @@ -11,7 +11,7 @@ ], "description": "Internationalization (i18n) for Next.js", "license": "MIT", - "homepage": "https://next-intl-docs.vercel.app", + "homepage": "https://next-intl.dev", "repository": { "type": "git", "url": "https://github.com/amannn/next-intl" diff --git a/packages/next-intl/src/config.tsx b/packages/next-intl/src/config.tsx index 46ed72e73..352eca1db 100644 --- a/packages/next-intl/src/config.tsx +++ b/packages/next-intl/src/config.tsx @@ -1,5 +1,5 @@ export default function getConfig() { throw new Error( - "Couldn't find next-intl config file. Please follow the instructions at https://next-intl-docs.vercel.app/docs/getting-started/app-router" + "Couldn't find next-intl config file. Please follow the instructions at https://next-intl.dev/docs/getting-started/app-router" ); } diff --git a/packages/next-intl/src/navigation/react-client/createLocalizedPathnamesNavigation.tsx b/packages/next-intl/src/navigation/react-client/createLocalizedPathnamesNavigation.tsx index 58953a4ff..52babd5b4 100644 --- a/packages/next-intl/src/navigation/react-client/createLocalizedPathnamesNavigation.tsx +++ b/packages/next-intl/src/navigation/react-client/createLocalizedPathnamesNavigation.tsx @@ -25,7 +25,7 @@ import useBasePathname from './useBasePathname'; import useBaseRouter from './useBaseRouter'; /** - * @deprecated Consider switching to `createNavigation` (see https://next-intl-docs.vercel.app/blog/next-intl-3-22#create-navigation) + * @deprecated Consider switching to `createNavigation` (see https://next-intl.dev/blog/next-intl-3-22#create-navigation) **/ export default function createLocalizedPathnamesNavigation< AppLocales extends Locales, diff --git a/packages/next-intl/src/navigation/react-client/createNavigation.tsx b/packages/next-intl/src/navigation/react-client/createNavigation.tsx index 36c627bdd..7f3dd7698 100644 --- a/packages/next-intl/src/navigation/react-client/createNavigation.tsx +++ b/packages/next-intl/src/navigation/react-client/createNavigation.tsx @@ -51,7 +51,7 @@ export default function createNavigation< routing ); - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#usepathname */ + /** @see https://next-intl.dev/docs/routing/navigation#usepathname */ function usePathname(): [AppPathnames] extends [never] ? string : keyof AppPathnames { @@ -117,17 +117,17 @@ export default function createNavigation< return { ...router, - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#userouter */ + /** @see https://next-intl.dev/docs/routing/navigation#userouter */ push: createHandler< Parameters[1], typeof router.push >(router.push), - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#userouter */ + /** @see https://next-intl.dev/docs/routing/navigation#userouter */ replace: createHandler< Parameters[1], typeof router.replace >(router.replace), - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#userouter */ + /** @see https://next-intl.dev/docs/routing/navigation#userouter */ prefetch: createHandler< Parameters[1], typeof router.prefetch diff --git a/packages/next-intl/src/navigation/react-client/createSharedPathnamesNavigation.tsx b/packages/next-intl/src/navigation/react-client/createSharedPathnamesNavigation.tsx index de3de0023..d72e875cf 100644 --- a/packages/next-intl/src/navigation/react-client/createSharedPathnamesNavigation.tsx +++ b/packages/next-intl/src/navigation/react-client/createSharedPathnamesNavigation.tsx @@ -12,7 +12,7 @@ import useBasePathname from './useBasePathname'; import useBaseRouter from './useBaseRouter'; /** - * @deprecated Consider switching to `createNavigation` (see https://next-intl-docs.vercel.app/blog/next-intl-3-22#create-navigation) + * @deprecated Consider switching to `createNavigation` (see https://next-intl.dev/blog/next-intl-3-22#create-navigation) **/ export default function createSharedPathnamesNavigation< AppLocales extends Locales, diff --git a/packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx b/packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx index e32ab0f24..aa05d2a68 100644 --- a/packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx +++ b/packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx @@ -86,11 +86,11 @@ export default function createSharedNavigationFns< ComponentProps, 'href' | 'localePrefix' | 'unprefixed' | 'defaultLocale' | 'localeCookie' > & { - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#link */ + /** @see https://next-intl.dev/docs/routing/navigation#link */ href: [AppPathnames] extends [never] ? ComponentProps['href'] : HrefOrUrlObjectWithParams; - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#link */ + /** @see https://next-intl.dev/docs/routing/navigation#link */ locale?: string; } >; @@ -181,7 +181,7 @@ export default function createSharedNavigationFns< : { /** * In case you're using `localePrefix: 'as-needed'` in combination with `domains`, the `defaultLocale` can differ by domain and therefore the locales that need to be prefixed can differ as well. For this particular case, this parameter should be provided in order to compute the correct pathname. Note that the actual domain is not part of the result, but only the pathname is returned. - * @see https://next-intl-docs.vercel.app/docs/routing/navigation#getpathname + * @see https://next-intl.dev/docs/routing/navigation#getpathname */ domain: AppDomains[number]['domain']; } @@ -189,7 +189,7 @@ export default function createSharedNavigationFns< function getPathname( args: { - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#getpathname */ + /** @see https://next-intl.dev/docs/routing/navigation#getpathname */ href: [AppPathnames] extends [never] ? string | {pathname: string; query?: QueryParams} : HrefOrHrefWithParams; @@ -233,7 +233,7 @@ export default function createSharedNavigationFns< function getRedirectFn( fn: typeof nextRedirect | typeof nextPermanentRedirect ) { - /** @see https://next-intl-docs.vercel.app/docs/routing/navigation#redirect */ + /** @see https://next-intl.dev/docs/routing/navigation#redirect */ return function redirectFn( args: Omit[0], 'domain'> & Partial, diff --git a/packages/next-intl/src/navigation/shared/utils.tsx b/packages/next-intl/src/navigation/shared/utils.tsx index 789b78536..2dd158146 100644 --- a/packages/next-intl/src/navigation/shared/utils.tsx +++ b/packages/next-intl/src/navigation/shared/utils.tsx @@ -273,7 +273,7 @@ export function applyPathnamePrefix< } else if (process.env.NODE_ENV !== 'production') { if (!domain) { console.error( - "You're using a routing configuration with `localePrefix: 'as-needed'` in combination with `domains`. In order to compute a correct pathname, you need to provide a `domain` parameter.\n\nSee: https://next-intl-docs.vercel.app/docs/routing#domains-localeprefix-asneeded" + "You're using a routing configuration with `localePrefix: 'as-needed'` in combination with `domains`. In order to compute a correct pathname, you need to provide a `domain` parameter.\n\nSee: https://next-intl.dev/docs/routing#domains-localeprefix-asneeded" ); } else { // If a domain was provided, but it wasn't found in the routing diff --git a/packages/next-intl/src/plugin.tsx b/packages/next-intl/src/plugin.tsx index afa33423f..96a2ec8a8 100644 --- a/packages/next-intl/src/plugin.tsx +++ b/packages/next-intl/src/plugin.tsx @@ -51,7 +51,7 @@ function resolveI18nPath(providedPath?: string, cwd?: string) { if (pathExists(candidate)) { if (!hasWarnedForDeprecatedI18nConfig) { console.warn( - `\n[next-intl] Reading request configuration from ${candidate} is deprecated, please see https://next-intl-docs.vercel.app/blog/next-intl-3-22#i18n-request — you can either move your configuration to ./i18n/request.ts or provide a custom path in your Next.js config: + `\n[next-intl] Reading request configuration from ${candidate} is deprecated, please see https://next-intl.dev/blog/next-intl-3-22#i18n-request — you can either move your configuration to ./i18n/request.ts or provide a custom path in your Next.js config: const withNextIntl = createNextIntlPlugin( './path/to/i18n/request.tsx' @@ -78,7 +78,7 @@ const withNextIntl = createNextIntlPlugin( function initPlugin(i18nPath?: string, nextConfig?: NextConfig): NextConfig { if (nextConfig?.i18n != null) { console.warn( - "\n[next-intl] An `i18n` property was found in your Next.js config. This likely causes conflicts and should therefore be removed if you use the App Router.\n\nIf you're in progress of migrating from the Pages Router, you can refer to this example: https://next-intl-docs.vercel.app/examples#app-router-migration\n" + "\n[next-intl] An `i18n` property was found in your Next.js config. This likely causes conflicts and should therefore be removed if you use the App Router.\n\nIf you're in progress of migrating from the Pages Router, you can refer to this example: https://next-intl.dev/examples#app-router-migration\n" ); } diff --git a/packages/next-intl/src/react-client/index.tsx b/packages/next-intl/src/react-client/index.tsx index aca9e6df9..335f33d66 100644 --- a/packages/next-intl/src/react-client/index.tsx +++ b/packages/next-intl/src/react-client/index.tsx @@ -30,7 +30,7 @@ This can happen because: failed, and therefore React attempted to render the component on the client instead. If this is the case, check the console for server errors. 2) You intended to render this component on the client side, but no context was found. - Learn more about this error here: https://next-intl-docs.vercel.app/docs/environments/server-client-components#missing-context` + Learn more about this error here: https://next-intl.dev/docs/environments/server-client-components#missing-context` : undefined ); } diff --git a/packages/next-intl/src/react-server/useConfig.tsx b/packages/next-intl/src/react-server/useConfig.tsx index 2731c730d..83b7227a6 100644 --- a/packages/next-intl/src/react-server/useConfig.tsx +++ b/packages/next-intl/src/react-server/useConfig.tsx @@ -10,7 +10,7 @@ function useHook(hookName: string, promise: Promise) { error.message.includes("Cannot read properties of null (reading 'use')") ) { throw new Error( - `\`${hookName}\` is not callable within an async component. Please refer to https://next-intl-docs.vercel.app/docs/environments/server-client-components#async-components`, + `\`${hookName}\` is not callable within an async component. Please refer to https://next-intl.dev/docs/environments/server-client-components#async-components`, {cause: error} ); } else { diff --git a/packages/next-intl/src/routing/config.tsx b/packages/next-intl/src/routing/config.tsx index 4e50c5ad9..46d357d85 100644 --- a/packages/next-intl/src/routing/config.tsx +++ b/packages/next-intl/src/routing/config.tsx @@ -32,43 +32,43 @@ export type RoutingConfig< > = { /** * All available locales. - * @see https://next-intl-docs.vercel.app/docs/routing + * @see https://next-intl.dev/docs/routing */ locales: AppLocales; /** * Used when no locale matches. - * @see https://next-intl-docs.vercel.app/docs/routing + * @see https://next-intl.dev/docs/routing */ defaultLocale: AppLocales[number]; /** * Configures whether and which prefix is shown for a given locale. - * @see https://next-intl-docs.vercel.app/docs/routing#locale-prefix + * @see https://next-intl.dev/docs/routing#locale-prefix **/ localePrefix?: LocalePrefix; /** * Can be used to change the locale handling per domain. - * @see https://next-intl-docs.vercel.app/docs/routing#domains + * @see https://next-intl.dev/docs/routing#domains **/ domains?: AppDomains; /** * Can be used to disable the locale cookie or to customize it. - * @see https://next-intl-docs.vercel.app/docs/routing/middleware#locale-cookie + * @see https://next-intl.dev/docs/routing/middleware#locale-cookie */ localeCookie?: boolean | CookieAttributes; /** * Sets the `Link` response header to notify search engines about content in other languages (defaults to `true`). See https://developers.google.com/search/docs/specialty/international/localized-versions#http - * @see https://next-intl-docs.vercel.app/docs/routing/middleware#alternate-links + * @see https://next-intl.dev/docs/routing/middleware#alternate-links **/ alternateLinks?: boolean; /** * By setting this to `false`, the cookie as well as the `accept-language` header will no longer be used for locale detection. - * @see https://next-intl-docs.vercel.app/docs/routing/middleware#locale-detection + * @see https://next-intl.dev/docs/routing/middleware#locale-detection **/ localeDetection?: boolean; } & ([AppPathnames] extends [never] @@ -77,7 +77,7 @@ export type RoutingConfig< : { /** * A map of localized pathnames per locale. - * @see https://next-intl-docs.vercel.app/docs/routing#pathnames + * @see https://next-intl.dev/docs/routing#pathnames **/ pathnames: AppPathnames; }); diff --git a/packages/next-intl/src/server/react-server/RequestLocale.tsx b/packages/next-intl/src/server/react-server/RequestLocale.tsx index bfadd880c..2a62aeaaa 100644 --- a/packages/next-intl/src/server/react-server/RequestLocale.tsx +++ b/packages/next-intl/src/server/react-server/RequestLocale.tsx @@ -24,7 +24,7 @@ async function getLocaleFromHeaderImpl(): Promise { (error as any).digest === 'DYNAMIC_SERVER_USAGE' ) { const wrappedError = new Error( - 'Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing#static-rendering', + 'Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing#static-rendering', {cause: error} ); (wrappedError as any).digest = (error as any).digest; diff --git a/packages/next-intl/src/server/react-server/RequestLocaleLegacy.tsx b/packages/next-intl/src/server/react-server/RequestLocaleLegacy.tsx index 1a267f566..64904e170 100644 --- a/packages/next-intl/src/server/react-server/RequestLocaleLegacy.tsx +++ b/packages/next-intl/src/server/react-server/RequestLocaleLegacy.tsx @@ -22,7 +22,7 @@ function getLocaleFromHeaderImpl() { (error as any).digest === 'DYNAMIC_SERVER_USAGE' ) { throw new Error( - 'Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing#static-rendering', + 'Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing#static-rendering', {cause: error} ); } else { @@ -33,7 +33,7 @@ function getLocaleFromHeaderImpl() { if (!locale) { if (process.env.NODE_ENV !== 'production') { console.error( - `\nUnable to find \`next-intl\` locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale. The \`notFound()\` function will be called as a result.\n` + `\nUnable to find \`next-intl\` locale because the middleware didn't run on this request. See https://next-intl.dev/docs/routing/middleware#unable-to-find-locale. The \`notFound()\` function will be called as a result.\n` ); } notFound(); diff --git a/packages/next-intl/src/server/react-server/getConfig.tsx b/packages/next-intl/src/server/react-server/getConfig.tsx index a5fbbe326..0bef0d73e 100644 --- a/packages/next-intl/src/server/react-server/getConfig.tsx +++ b/packages/next-intl/src/server/react-server/getConfig.tsx @@ -39,7 +39,7 @@ Please verify that: 1. In case you've specified a custom location in your Next.js config, make sure that the path is correct. 2. You have a default export in your i18n request configuration file. -See also: https://next-intl-docs.vercel.app/docs/usage/configuration#i18n-request +See also: https://next-intl.dev/docs/usage/configuration#i18n-request ` ); } @@ -69,7 +69,7 @@ See also: https://next-intl-docs.vercel.app/docs/usage/configuration#i18n-reques if (!locale) { if (process.env.NODE_ENV !== 'production') { console.error( - `\nUnable to find \`next-intl\` locale because the middleware didn't run on this request and no \`locale\` was returned in \`getRequestConfig\`. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale. The \`notFound()\` function will be called as a result.\n` + `\nUnable to find \`next-intl\` locale because the middleware didn't run on this request and no \`locale\` was returned in \`getRequestConfig\`. See https://next-intl.dev/docs/routing/middleware#unable-to-find-locale. The \`notFound()\` function will be called as a result.\n` ); } notFound(); diff --git a/packages/next-intl/src/server/react-server/getMessages.tsx b/packages/next-intl/src/server/react-server/getMessages.tsx index 72d6ac118..0fc92bcbe 100644 --- a/packages/next-intl/src/server/react-server/getMessages.tsx +++ b/packages/next-intl/src/server/react-server/getMessages.tsx @@ -7,7 +7,7 @@ export function getMessagesFromConfig( ): AbstractIntlMessages { if (!config.messages) { throw new Error( - 'No messages found. Have you configured them correctly? See https://next-intl-docs.vercel.app/docs/configuration#messages' + 'No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages' ); } return config.messages; diff --git a/packages/next-intl/src/server/react-server/getRequestConfig.tsx b/packages/next-intl/src/server/react-server/getRequestConfig.tsx index 127656ff5..3e6a88248 100644 --- a/packages/next-intl/src/server/react-server/getRequestConfig.tsx +++ b/packages/next-intl/src/server/react-server/getRequestConfig.tsx @@ -16,7 +16,7 @@ export type RequestConfig = Omit & { export type GetRequestConfigParams = { /** - * Deprecated in favor of `requestLocale` (see https://next-intl-docs.vercel.app/blog/next-intl-3-22#await-request-locale). + * Deprecated in favor of `requestLocale` (see https://next-intl.dev/blog/next-intl-3-22#await-request-locale). * * The locale that was matched by the `[locale]` path segment. Note however * that this can be overridden in async APIs when the `locale` is explicitly @@ -39,7 +39,7 @@ export type GetRequestConfigParams = { * catch-all for unknown routes (e.g. `/unknown.txt`), invalid values should * be replaced with a valid locale. * - * @see https://next-intl-docs.vercel.app/docs/usage/configuration#i18n-request + * @see https://next-intl.dev/docs/usage/configuration#i18n-request */ requestLocale: Promise; }; diff --git a/packages/next-intl/src/shared/NextIntlClientProvider.tsx b/packages/next-intl/src/shared/NextIntlClientProvider.tsx index 2b0385ae4..9f9cdce55 100644 --- a/packages/next-intl/src/shared/NextIntlClientProvider.tsx +++ b/packages/next-intl/src/shared/NextIntlClientProvider.tsx @@ -16,7 +16,7 @@ export default function NextIntlClientProvider({locale, ...rest}: Props) { if (!locale) { throw new Error( process.env.NODE_ENV !== 'production' - ? 'Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl-docs.vercel.app/docs/configuration#locale' + ? 'Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl.dev/docs/configuration#locale' : undefined ); } diff --git a/packages/use-intl/README.md b/packages/use-intl/README.md index fb82c1bc9..1a7150d9f 100644 --- a/packages/use-intl/README.md +++ b/packages/use-intl/README.md @@ -80,4 +80,4 @@ function App({user}) { Have a look at [the minimal setup example](https://github.com/amannn/next-intl/tree/main/examples/example-use-intl) to explore a working app. -### [→ Read the docs](https://next-intl-docs.vercel.app/docs/environments/core-library) +### [→ Read the docs](https://next-intl.dev/docs/environments/core-library) diff --git a/packages/use-intl/package.json b/packages/use-intl/package.json index 693c4d87d..93a87328e 100644 --- a/packages/use-intl/package.json +++ b/packages/use-intl/package.json @@ -5,7 +5,7 @@ "author": "Jan Amann ", "description": "Internationalization (i18n) for React", "license": "MIT", - "homepage": "https://next-intl-docs.vercel.app/", + "homepage": "https://next-intl.dev", "repository": { "type": "git", "url": "https://github.com/amannn/next-intl/tree/main/packages/use-intl" diff --git a/packages/use-intl/src/core/AbstractIntlMessages.tsx b/packages/use-intl/src/core/AbstractIntlMessages.tsx index 42f02a333..dd496ea98 100644 --- a/packages/use-intl/src/core/AbstractIntlMessages.tsx +++ b/packages/use-intl/src/core/AbstractIntlMessages.tsx @@ -1,7 +1,7 @@ /** A generic type that describes the shape of messages. * * Optionally `IntlMessages` can be provided to get type safety for message - * namespaces and keys. See https://next-intl-docs.vercel.app/docs/usage/typescript + * namespaces and keys. See https://next-intl.dev/docs/usage/typescript */ type AbstractIntlMessages = { [id: string]: AbstractIntlMessages | string; diff --git a/packages/use-intl/src/core/IntlConfig.tsx b/packages/use-intl/src/core/IntlConfig.tsx index 487beff34..b7d51ea44 100644 --- a/packages/use-intl/src/core/IntlConfig.tsx +++ b/packages/use-intl/src/core/IntlConfig.tsx @@ -45,7 +45,7 @@ type IntlConfig = { * Can be used for consistent usage or styling of rich text elements. * Defaults will be overidden by locally provided values. * - * @deprecated See https://next-intl-docs.vercel.app/docs/usage/messages#rich-text-reuse-tags + * @deprecated See https://next-intl.dev/docs/usage/messages#rich-text-reuse-tags **/ defaultTranslationValues?: RichTranslationValues; }; diff --git a/packages/use-intl/src/core/createBaseTranslator.tsx b/packages/use-intl/src/core/createBaseTranslator.tsx index 41736e4f3..f1e90eb74 100644 --- a/packages/use-intl/src/core/createBaseTranslator.tsx +++ b/packages/use-intl/src/core/createBaseTranslator.tsx @@ -249,7 +249,7 @@ function createBaseTranslatorImpl< errorMessage = `Message at \`${joinPath( namespace, key - )}\` resolved to an array, but only strings are supported. See https://next-intl-docs.vercel.app/docs/usage/messages#arrays-of-messages`; + )}\` resolved to an array, but only strings are supported. See https://next-intl.dev/docs/usage/messages#arrays-of-messages`; } } else { code = IntlErrorCode.INSUFFICIENT_PATH; @@ -257,7 +257,7 @@ function createBaseTranslatorImpl< errorMessage = `Message at \`${joinPath( namespace, key - )}\` resolved to an object, but only strings are supported. Use a \`.\` to retrieve nested messages. See https://next-intl-docs.vercel.app/docs/usage/messages#structuring-messages`; + )}\` resolved to an object, but only strings are supported. Use a \`.\` to retrieve nested messages. See https://next-intl.dev/docs/usage/messages#structuring-messages`; } } diff --git a/packages/use-intl/src/core/createFormatter.tsx b/packages/use-intl/src/core/createFormatter.tsx index f5745f566..f4064fb68 100644 --- a/packages/use-intl/src/core/createFormatter.tsx +++ b/packages/use-intl/src/core/createFormatter.tsx @@ -99,7 +99,7 @@ export default function createFormatter({ new IntlError( IntlErrorCode.ENVIRONMENT_FALLBACK, process.env.NODE_ENV !== 'production' - ? `The \`timeZone\` parameter wasn't provided and there is no global default configured. Consider adding a global default to avoid markup mismatches caused by environment differences. Learn more: https://next-intl-docs.vercel.app/docs/configuration#time-zone` + ? `The \`timeZone\` parameter wasn't provided and there is no global default configured. Consider adding a global default to avoid markup mismatches caused by environment differences. Learn more: https://next-intl.dev/docs/configuration#time-zone` : undefined ) ); @@ -224,7 +224,7 @@ export default function createFormatter({ new IntlError( IntlErrorCode.ENVIRONMENT_FALLBACK, process.env.NODE_ENV !== 'production' - ? `The \`now\` parameter wasn't provided and there is no global default configured. Consider adding a global default to avoid markup mismatches caused by environment differences. Learn more: https://next-intl-docs.vercel.app/docs/configuration#now` + ? `The \`now\` parameter wasn't provided and there is no global default configured. Consider adding a global default to avoid markup mismatches caused by environment differences. Learn more: https://next-intl.dev/docs/configuration#now` : undefined ) ); diff --git a/packages/use-intl/src/react/useIntlContext.tsx b/packages/use-intl/src/react/useIntlContext.tsx index 2df59c853..e8d3a5f2c 100644 --- a/packages/use-intl/src/react/useIntlContext.tsx +++ b/packages/use-intl/src/react/useIntlContext.tsx @@ -7,7 +7,7 @@ export default function useIntlContext(): IntlContextValue { if (!context) { throw new Error( process.env.NODE_ENV !== 'production' - ? 'No intl context found. Have you configured the provider? See https://next-intl-docs.vercel.app/docs/usage/configuration#client-server-components' + ? 'No intl context found. Have you configured the provider? See https://next-intl.dev/docs/usage/configuration#client-server-components' : undefined ); } diff --git a/packages/use-intl/src/react/useMessages.tsx b/packages/use-intl/src/react/useMessages.tsx index 24a9d0481..315583eeb 100644 --- a/packages/use-intl/src/react/useMessages.tsx +++ b/packages/use-intl/src/react/useMessages.tsx @@ -7,7 +7,7 @@ export default function useMessages(): AbstractIntlMessages { if (!context.messages) { throw new Error( process.env.NODE_ENV !== 'production' - ? 'No messages found. Have you configured them correctly? See https://next-intl-docs.vercel.app/docs/configuration#messages' + ? 'No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages' : undefined ); } diff --git a/packages/use-intl/src/react/useTranslations.test.tsx b/packages/use-intl/src/react/useTranslations.test.tsx index 4d934035c..ded90ee04 100644 --- a/packages/use-intl/src/react/useTranslations.test.tsx +++ b/packages/use-intl/src/react/useTranslations.test.tsx @@ -840,7 +840,7 @@ describe('error handling', () => { const error: IntlError = onError.mock.calls[0][0]; expect(error.code).toBe(IntlErrorCode.INSUFFICIENT_PATH); expect(error.message).toBe( - 'INSUFFICIENT_PATH: Message at `Component.object` resolved to an object, but only strings are supported. Use a `.` to retrieve nested messages. See https://next-intl-docs.vercel.app/docs/usage/messages#structuring-messages' + 'INSUFFICIENT_PATH: Message at `Component.object` resolved to an object, but only strings are supported. Use a `.` to retrieve nested messages. See https://next-intl.dev/docs/usage/messages#structuring-messages' ); }); @@ -865,7 +865,7 @@ describe('error handling', () => { const error: IntlError = onError.mock.calls[0][0]; expect(error.code).toBe(IntlErrorCode.INSUFFICIENT_PATH); expect(error.message).toBe( - 'INSUFFICIENT_PATH: Message at `Component.object` resolved to an object, but only strings are supported. Use a `.` to retrieve nested messages. See https://next-intl-docs.vercel.app/docs/usage/messages#structuring-messages' + 'INSUFFICIENT_PATH: Message at `Component.object` resolved to an object, but only strings are supported. Use a `.` to retrieve nested messages. See https://next-intl.dev/docs/usage/messages#structuring-messages' ); }); @@ -891,7 +891,7 @@ describe('error handling', () => { const error: IntlError = onError.mock.calls[0][0]; expect(error.code).toBe(IntlErrorCode.INVALID_MESSAGE); expect(error.message).toBe( - 'INVALID_MESSAGE: Message at `Component.array` resolved to an array, but only strings are supported. See https://next-intl-docs.vercel.app/docs/usage/messages#arrays-of-messages' + 'INVALID_MESSAGE: Message at `Component.array` resolved to an array, but only strings are supported. See https://next-intl.dev/docs/usage/messages#arrays-of-messages' ); }); @@ -917,7 +917,7 @@ describe('error handling', () => { const error: IntlError = onError.mock.calls[0][0]; expect(error.code).toBe(IntlErrorCode.INVALID_MESSAGE); expect(error.message).toBe( - 'INVALID_MESSAGE: Message at `Component.array` resolved to an array, but only strings are supported. See https://next-intl-docs.vercel.app/docs/usage/messages#arrays-of-messages' + 'INVALID_MESSAGE: Message at `Component.array` resolved to an array, but only strings are supported. See https://next-intl.dev/docs/usage/messages#arrays-of-messages' ); }); }); diff --git a/packages/use-intl/src/react/useTranslationsImpl.tsx b/packages/use-intl/src/react/useTranslationsImpl.tsx index 6529d00b6..d79fc8302 100644 --- a/packages/use-intl/src/react/useTranslationsImpl.tsx +++ b/packages/use-intl/src/react/useTranslationsImpl.tsx @@ -43,7 +43,7 @@ export default function useTranslationsImpl< new IntlError( IntlErrorCode.ENVIRONMENT_FALLBACK, process.env.NODE_ENV !== 'production' - ? `There is no \`timeZone\` configured, this can lead to markup mismatches caused by environment differences. Consider adding a global default: https://next-intl-docs.vercel.app/docs/configuration#time-zone` + ? `There is no \`timeZone\` configured, this can lead to markup mismatches caused by environment differences. Consider adding a global default: https://next-intl.dev/docs/configuration#time-zone` : undefined ) );