Skip to content

Commit 40a9a77

Browse files
authored
fix: Use new domain next-intl.dev in links (amannn#1601)
1 parent 529ce6e commit 40a9a77

39 files changed

+68
-68
lines changed

.github/ISSUE_TEMPLATE/01_bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ body:
2323
attributes:
2424
label: Verifications
2525
options:
26-
- label: I've verified that the problem I'm experiencing isn't covered in [the docs](https://next-intl-docs.vercel.app/).
26+
- label: I've verified that the problem I'm experiencing isn't covered in [the docs](https://next-intl.dev).
2727
required: true
2828
- 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).
2929
required: true
30-
- label: I've compared my app to [a working example](https://next-intl-docs.vercel.app/examples) to look for differences.
30+
- label: I've compared my app to [a working example](https://next-intl.dev/examples) to look for differences.
3131
required: true
3232
- type: input
3333
attributes:

.github/ISSUE_TEMPLATE/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: View documentation
4-
url: https://next-intl-docs.vercel.app/
4+
url: https://next-intl.dev
55
about: Check out the official docs for answers to common questions
66
- name: Get community support
77
url: https://stackoverflow.com/questions/ask

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">
22
<br>
3-
<a href="https://next-intl-docs.vercel.app/">
3+
<a href="https://next-intl.dev">
44
<picture>
55
<source media="(prefers-color-scheme: dark)" srcset="media/logo-dark-mode.svg">
66
<source media="(prefers-color-scheme: light)" srcset="media/logo.svg">
@@ -29,10 +29,10 @@ Internationalization (i18n) is an essential part of the user experience, therefo
2929
```jsx
3030
// UserProfile.tsx
3131
import {useTranslations} from 'next-intl';
32-
32+
3333
export default function UserProfile({user}) {
3434
const t = useTranslations('UserProfile');
35-
35+
3636
return (
3737
<section>
3838
<h1>{t('title', {firstName: user.firstName})}</h1>
@@ -58,10 +58,10 @@ export default function UserProfile({user}) {
5858
}
5959
```
6060

61-
### [→ Read the docs](https://next-intl-docs.vercel.app/)
61+
### [→ Read the docs](https://next-intl.dev)
6262

6363
<div align="center">
64-
<a href="https://next-intl-docs.vercel.app/redirect?href=https://crowdin.com" target="_blank">
64+
<a href="https://next-intl.dev/redirect?href=https://crowdin.com" target="_blank">
6565
<img width="350" src="media/partner.svg" alt="Crowdin logo">
6666
</a>
6767
<br>

examples/example-app-router-mixed-routing/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ An example of how to achieve locale prefixes on public routes while reading the
44

55
**Relevant docs:**
66

7-
1. [Setting up `next-intl` with i18n routing](https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing)
8-
2. [Setting up `next-intl` without i18n routing](https://next-intl-docs.vercel.app/docs/getting-started/app-router/without-i18n-routing)
7+
1. [Setting up `next-intl` with i18n routing](https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing)
8+
2. [Setting up `next-intl` without i18n routing](https://next-intl.dev/docs/getting-started/app-router/without-i18n-routing)
99

1010
**Relevant parts in app code:**
1111

examples/example-app-router-next-auth/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ An example that showcases the usage of `next-intl` together with Auth.js and the
44

55
**Credentials**: admin / admin
66

7-
See [the corresponding docs for this example](https://next-intl-docs.vercel.app/docs/routing/middleware#example-auth-js).
7+
See [the corresponding docs for this example](https://next-intl.dev/docs/routing/middleware#example-auth-js).
88

99
## Deploy your own
1010

examples/example-app-router-without-i18n-routing/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# example-app-router-without-i18n-routing
22

3-
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)).
3+
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)).
44

55
This app uses Server Actions in two places:
66

examples/example-app-router/messages/de.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"links": {
3131
"docs": {
3232
"description": "Erfahre mehr über next-intl in der offiziellen Dokumentation.",
33-
"href": "https://next-intl-docs.vercel.app/",
33+
"href": "https://next-intl.dev",
3434
"title": "Dokumentation"
3535
},
3636
"source": {

examples/example-app-router/messages/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"links": {
3030
"docs": {
3131
"description": "Learn more about next-intl in the official docs.",
32-
"href": "https://next-intl-docs.vercel.app/",
32+
"href": "https://next-intl.dev",
3333
"title": "Docs"
3434
},
3535
"source": {

examples/example-pages-router-advanced/src/pages/about.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function getServerSideProps({locale}: GetServerSidePropsContext) {
3131
),
3232
// Note that when `now` is passed to the app, you need to make sure the
3333
// value is updated from time to time, so relative times are updated. See
34-
// https://next-intl-docs.vercel.app/docs/usage/configuration#global-now-value
34+
// https://next-intl.dev/docs/usage/configuration#global-now-value
3535
now: new Date().getTime()
3636
}
3737
};

examples/example-react-native/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
An example that showcases the usage of `use-intl` with React Native.
44

5-
Please double check that [the runtime requirements](https://next-intl-docs.vercel.app/docs/environments/runtime-requirements) are fulfilled.
5+
Please double check that [the runtime requirements](https://next-intl.dev/docs/environments/runtime-requirements) are fulfilled.
66

77
```
88
pnpm install

media/assets.sketch

-42 KB
Binary file not shown.

packages/next-intl/.size-limit.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ const config: SizeLimitConfig = [
3939
name: "import {createLocalizedPathnamesNavigation} from 'next-intl/navigation' (react-server)",
4040
path: 'dist/production/navigation.react-server.js',
4141
import: '{createLocalizedPathnamesNavigation}',
42-
limit: '16.785 KB'
42+
limit: '16.805 KB'
4343
},
4444
{
4545
name: "import {createNavigation} from 'next-intl/navigation' (react-server)",
4646
path: 'dist/production/navigation.react-server.js',
4747
import: '{createNavigation}',
48-
limit: '16.8 KB'
48+
limit: '16.805 KB'
4949
},
5050
{
5151
name: "import * from 'next-intl/server' (react-client)",

packages/next-intl/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"description": "Internationalization (i18n) for Next.js",
1313
"license": "MIT",
14-
"homepage": "https://next-intl-docs.vercel.app",
14+
"homepage": "https://next-intl.dev",
1515
"repository": {
1616
"type": "git",
1717
"url": "https://github.com/amannn/next-intl"

packages/next-intl/src/config.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default function getConfig() {
22
throw new Error(
3-
"Couldn't find next-intl config file. Please follow the instructions at https://next-intl-docs.vercel.app/docs/getting-started/app-router"
3+
"Couldn't find next-intl config file. Please follow the instructions at https://next-intl.dev/docs/getting-started/app-router"
44
);
55
}

packages/next-intl/src/navigation/react-client/createLocalizedPathnamesNavigation.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import useBasePathname from './useBasePathname';
2525
import useBaseRouter from './useBaseRouter';
2626

2727
/**
28-
* @deprecated Consider switching to `createNavigation` (see https://next-intl-docs.vercel.app/blog/next-intl-3-22#create-navigation)
28+
* @deprecated Consider switching to `createNavigation` (see https://next-intl.dev/blog/next-intl-3-22#create-navigation)
2929
**/
3030
export default function createLocalizedPathnamesNavigation<
3131
AppLocales extends Locales,

packages/next-intl/src/navigation/react-client/createNavigation.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function createNavigation<
5151
routing
5252
);
5353

54-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#usepathname */
54+
/** @see https://next-intl.dev/docs/routing/navigation#usepathname */
5555
function usePathname(): [AppPathnames] extends [never]
5656
? string
5757
: keyof AppPathnames {
@@ -117,17 +117,17 @@ export default function createNavigation<
117117

118118
return {
119119
...router,
120-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#userouter */
120+
/** @see https://next-intl.dev/docs/routing/navigation#userouter */
121121
push: createHandler<
122122
Parameters<typeof router.push>[1],
123123
typeof router.push
124124
>(router.push),
125-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#userouter */
125+
/** @see https://next-intl.dev/docs/routing/navigation#userouter */
126126
replace: createHandler<
127127
Parameters<typeof router.replace>[1],
128128
typeof router.replace
129129
>(router.replace),
130-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#userouter */
130+
/** @see https://next-intl.dev/docs/routing/navigation#userouter */
131131
prefetch: createHandler<
132132
Parameters<typeof router.prefetch>[1],
133133
typeof router.prefetch

packages/next-intl/src/navigation/react-client/createSharedPathnamesNavigation.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import useBasePathname from './useBasePathname';
1212
import useBaseRouter from './useBaseRouter';
1313

1414
/**
15-
* @deprecated Consider switching to `createNavigation` (see https://next-intl-docs.vercel.app/blog/next-intl-3-22#create-navigation)
15+
* @deprecated Consider switching to `createNavigation` (see https://next-intl.dev/blog/next-intl-3-22#create-navigation)
1616
**/
1717
export default function createSharedPathnamesNavigation<
1818
AppLocales extends Locales,

packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ export default function createSharedNavigationFns<
8686
ComponentProps<typeof BaseLink>,
8787
'href' | 'localePrefix' | 'unprefixed' | 'defaultLocale' | 'localeCookie'
8888
> & {
89-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#link */
89+
/** @see https://next-intl.dev/docs/routing/navigation#link */
9090
href: [AppPathnames] extends [never]
9191
? ComponentProps<typeof BaseLink>['href']
9292
: HrefOrUrlObjectWithParams<Pathname>;
93-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#link */
93+
/** @see https://next-intl.dev/docs/routing/navigation#link */
9494
locale?: string;
9595
}
9696
>;
@@ -181,15 +181,15 @@ export default function createSharedNavigationFns<
181181
: {
182182
/**
183183
* 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.
184-
* @see https://next-intl-docs.vercel.app/docs/routing/navigation#getpathname
184+
* @see https://next-intl.dev/docs/routing/navigation#getpathname
185185
*/
186186
domain: AppDomains[number]['domain'];
187187
}
188188
: {};
189189

190190
function getPathname(
191191
args: {
192-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#getpathname */
192+
/** @see https://next-intl.dev/docs/routing/navigation#getpathname */
193193
href: [AppPathnames] extends [never]
194194
? string | {pathname: string; query?: QueryParams}
195195
: HrefOrHrefWithParams<keyof AppPathnames>;
@@ -233,7 +233,7 @@ export default function createSharedNavigationFns<
233233
function getRedirectFn(
234234
fn: typeof nextRedirect | typeof nextPermanentRedirect
235235
) {
236-
/** @see https://next-intl-docs.vercel.app/docs/routing/navigation#redirect */
236+
/** @see https://next-intl.dev/docs/routing/navigation#redirect */
237237
return function redirectFn(
238238
args: Omit<Parameters<typeof getPathname>[0], 'domain'> &
239239
Partial<DomainConfigForAsNeeded>,

packages/next-intl/src/navigation/shared/utils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export function applyPathnamePrefix<
273273
} else if (process.env.NODE_ENV !== 'production') {
274274
if (!domain) {
275275
console.error(
276-
"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"
276+
"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"
277277
);
278278
} else {
279279
// If a domain was provided, but it wasn't found in the routing

packages/next-intl/src/plugin.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function resolveI18nPath(providedPath?: string, cwd?: string) {
5151
if (pathExists(candidate)) {
5252
if (!hasWarnedForDeprecatedI18nConfig) {
5353
console.warn(
54-
`\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:
54+
`\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:
5555
5656
const withNextIntl = createNextIntlPlugin(
5757
'./path/to/i18n/request.tsx'
@@ -78,7 +78,7 @@ const withNextIntl = createNextIntlPlugin(
7878
function initPlugin(i18nPath?: string, nextConfig?: NextConfig): NextConfig {
7979
if (nextConfig?.i18n != null) {
8080
console.warn(
81-
"\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"
81+
"\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"
8282
);
8383
}
8484

packages/next-intl/src/react-client/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This can happen because:
3030
failed, and therefore React attempted to render the component on the client
3131
instead. If this is the case, check the console for server errors.
3232
2) You intended to render this component on the client side, but no context was found.
33-
Learn more about this error here: https://next-intl-docs.vercel.app/docs/environments/server-client-components#missing-context`
33+
Learn more about this error here: https://next-intl.dev/docs/environments/server-client-components#missing-context`
3434
: undefined
3535
);
3636
}

packages/next-intl/src/react-server/useConfig.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function useHook<Value>(hookName: string, promise: Promise<Value>) {
1010
error.message.includes("Cannot read properties of null (reading 'use')")
1111
) {
1212
throw new Error(
13-
`\`${hookName}\` is not callable within an async component. Please refer to https://next-intl-docs.vercel.app/docs/environments/server-client-components#async-components`,
13+
`\`${hookName}\` is not callable within an async component. Please refer to https://next-intl.dev/docs/environments/server-client-components#async-components`,
1414
{cause: error}
1515
);
1616
} else {

packages/next-intl/src/routing/config.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,43 @@ export type RoutingConfig<
3232
> = {
3333
/**
3434
* All available locales.
35-
* @see https://next-intl-docs.vercel.app/docs/routing
35+
* @see https://next-intl.dev/docs/routing
3636
*/
3737
locales: AppLocales;
3838

3939
/**
4040
* Used when no locale matches.
41-
* @see https://next-intl-docs.vercel.app/docs/routing
41+
* @see https://next-intl.dev/docs/routing
4242
*/
4343
defaultLocale: AppLocales[number];
4444

4545
/**
4646
* Configures whether and which prefix is shown for a given locale.
47-
* @see https://next-intl-docs.vercel.app/docs/routing#locale-prefix
47+
* @see https://next-intl.dev/docs/routing#locale-prefix
4848
**/
4949
localePrefix?: LocalePrefix<AppLocales, AppLocalePrefixMode>;
5050

5151
/**
5252
* Can be used to change the locale handling per domain.
53-
* @see https://next-intl-docs.vercel.app/docs/routing#domains
53+
* @see https://next-intl.dev/docs/routing#domains
5454
**/
5555
domains?: AppDomains;
5656

5757
/**
5858
* Can be used to disable the locale cookie or to customize it.
59-
* @see https://next-intl-docs.vercel.app/docs/routing/middleware#locale-cookie
59+
* @see https://next-intl.dev/docs/routing/middleware#locale-cookie
6060
*/
6161
localeCookie?: boolean | CookieAttributes;
6262

6363
/**
6464
* 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
65-
* @see https://next-intl-docs.vercel.app/docs/routing/middleware#alternate-links
65+
* @see https://next-intl.dev/docs/routing/middleware#alternate-links
6666
**/
6767
alternateLinks?: boolean;
6868

6969
/**
7070
* By setting this to `false`, the cookie as well as the `accept-language` header will no longer be used for locale detection.
71-
* @see https://next-intl-docs.vercel.app/docs/routing/middleware#locale-detection
71+
* @see https://next-intl.dev/docs/routing/middleware#locale-detection
7272
**/
7373
localeDetection?: boolean;
7474
} & ([AppPathnames] extends [never]
@@ -77,7 +77,7 @@ export type RoutingConfig<
7777
: {
7878
/**
7979
* A map of localized pathnames per locale.
80-
* @see https://next-intl-docs.vercel.app/docs/routing#pathnames
80+
* @see https://next-intl.dev/docs/routing#pathnames
8181
**/
8282
pathnames: AppPathnames;
8383
});

packages/next-intl/src/server/react-server/RequestLocale.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async function getLocaleFromHeaderImpl(): Promise<string | undefined> {
2424
(error as any).digest === 'DYNAMIC_SERVER_USAGE'
2525
) {
2626
const wrappedError = new Error(
27-
'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',
27+
'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',
2828
{cause: error}
2929
);
3030
(wrappedError as any).digest = (error as any).digest;

packages/next-intl/src/server/react-server/RequestLocaleLegacy.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function getLocaleFromHeaderImpl() {
2222
(error as any).digest === 'DYNAMIC_SERVER_USAGE'
2323
) {
2424
throw new Error(
25-
'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',
25+
'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',
2626
{cause: error}
2727
);
2828
} else {
@@ -33,7 +33,7 @@ function getLocaleFromHeaderImpl() {
3333
if (!locale) {
3434
if (process.env.NODE_ENV !== 'production') {
3535
console.error(
36-
`\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`
36+
`\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`
3737
);
3838
}
3939
notFound();

0 commit comments

Comments
 (0)