Skip to content

Commit 8b9a2fc

Browse files
committed
Merge remote-tracking branch 'origin/main' into v4
# Conflicts: # packages/next-intl/.size-limit.ts # packages/next-intl/package.json # packages/next-intl/src/navigation/react-client/createLocalizedPathnamesNavigation.tsx # packages/next-intl/src/navigation/react-client/createSharedPathnamesNavigation.tsx # packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx # packages/next-intl/src/plugin.tsx # packages/next-intl/src/server/react-server/RequestLocaleLegacy.tsx # packages/next-intl/src/server/react-server/getConfig.tsx # packages/next-intl/src/server/react-server/getRequestConfig.tsx # packages/next-intl/src/server/react-server/getTranslations.tsx # packages/next-intl/src/shared/NextIntlClientProvider.tsx # packages/use-intl/package.json # packages/use-intl/src/core/AbstractIntlMessages.tsx # packages/use-intl/src/core/IntlConfig.tsx # packages/use-intl/src/core/createFormatter.tsx # packages/use-intl/src/react/useIntlContext.tsx # pnpm-lock.yaml
2 parents 8f37883 + a6e070b commit 8b9a2fc

File tree

73 files changed

+261
-349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+261
-349
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

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 3.26.2 (2024-12-18)
7+
8+
### Bug Fixes
9+
10+
* Support `t.has` when `getTranslations` is called with an object argument ([#1616](https://github.com/amannn/next-intl/issues/1616)) ([64895a2](https://github.com/amannn/next-intl/commit/64895a2bb3c445f6e3deab85152a0d04ced17e46)), closes [/github.com/amannn/next-intl/discussions/437#discussioncomment-11593318](https://github.com/amannn//github.com/amannn/next-intl/discussions/437/issues/discussioncomment-11593318) – by @amannn
11+
12+
## 3.26.1 (2024-12-11)
13+
14+
### Bug Fixes
15+
16+
* Use new domain `next-intl.dev` in links ([#1601](https://github.com/amannn/next-intl/issues/1601)) ([40a9a77](https://github.com/amannn/next-intl/commit/40a9a7722edc8e7787ed799a4bf1d3c4a2e04848)) – by @amannn
17+
18+
## 3.26.0 (2024-12-06)
19+
20+
### Features
21+
22+
* Support React 19 ([#1597](https://github.com/amannn/next-intl/issues/1597)) ([e0ffe29](https://github.com/amannn/next-intl/commit/e0ffe292a3cae8955fcd06bd8e8e2b02c525ef69)) – by @amannn
23+
624
## 3.25.3 (2024-11-26)
725

826
### Bug Fixes

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>

docs/next-sitemap.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const config = require('./config');
1+
const config = require('./src/config');
22

33
/** @type {import('next-sitemap').IConfig} */
44
module.exports = {

docs/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"dev": "next dev",
66
"lint": "eslint src && tsc && prettier src --check && node lintLinks.mjs",
77
"test": "echo 'No tests yet'",
8-
"build": "next build",
9-
"sitemap": "next-sitemap",
8+
"build": "next build && next-sitemap",
109
"start": "next start"
1110
},
1211
"dependencies": {
@@ -15,7 +14,6 @@
1514
"@headlessui/react": "^2.0.0",
1615
"@heroicons/react": "^2.1.4",
1716
"@vercel/analytics": "1.3.1",
18-
"@vercel/og": "^0.6.3",
1917
"@vercel/speed-insights": "^1.0.12",
2018
"clsx": "^2.1.1",
2119
"http-status-codes": "^2.3.0",
373 Bytes
Loading
-35.8 KB
Binary file not shown.
38.1 KB
Loading
-275 Bytes
Loading

docs/public/favicon/browserconfig.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<msapplication>
44
<tile>
55
<square150x150logo src="/mstile-150x150.png"/>
6-
<TileColor>#da532c</TileColor>
6+
<TileColor>#ffffff</TileColor>
77
</tile>
88
</msapplication>
99
</browserconfig>

docs/public/favicon/favicon-16x16.png

-447 Bytes
Loading

docs/public/favicon/favicon-32x32.png

-356 Bytes
Loading

docs/public/favicon/favicon.ico

320 Bytes
Binary file not shown.
958 Bytes
Loading

docs/public/favicon/site.webmanifest

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"type": "image/png"
99
},
1010
{
11-
"src": "/favicon/android-chrome-384x384.png",
12-
"sizes": "384x384",
11+
"src": "/favicon/android-chrome-512x512.png",
12+
"sizes": "512x512",
1313
"type": "image/png"
1414
}
1515
],

docs/public/logo.svg

-2
This file was deleted.

docs/public/twitter-image.png

17 KB
Loading

docs/src/components/GetStartedBackground.module.css

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
}
1111
}
1212

13+
.dot {
14+
--GetStartedBackground-dot: rgba(0, 0, 0, 0.1);
15+
16+
:global(.dark) & {
17+
--GetStartedBackground-dot: rgba(255, 255, 255, 0.1);
18+
}
19+
}
20+
1321
.dot1 {
1422
animation: pulsate 4s infinite;
1523
}

docs/src/components/GetStartedBackground.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ export default function GetStartedBackground() {
2323
patternUnits="userSpaceOnUse"
2424
width={patternSize}
2525
>
26-
<circle cx="3" cy="3" fill="#D0D3E2" r={radius} />
26+
<circle
27+
className={styles.dot}
28+
cx="3"
29+
cy="3"
30+
fill="var(--GetStartedBackground-dot)"
31+
r={radius}
32+
/>
2733
</pattern>
2834
<radialGradient cx="50%" cy="50%" id="fade-out" r="50%">
2935
<stop offset="0%" stopColor="white" stopOpacity="1" />

docs/src/components/Logo.tsx

+29-44
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,47 @@ export default function Logo() {
33
<svg
44
aria-label="next-intl logo"
55
className="h-8"
6-
viewBox="0 0 1663.8 399"
6+
viewBox="0 0 499 120"
77
xmlns="http://www.w3.org/2000/svg"
88
>
9-
<g>
9+
<g fill="none" fillRule="evenodd">
1010
<path
11-
d="M811.8,483V346.8c2-.8,6.4-1.7,13-2.7a164.81,164.81,0,0,1,23.9-1.5c8.6,0,15.8,1,21.5,3.1A28.62,28.62,0,0,1,884,356.1q5.25,7.2,7.5,18.6c1.5,7.6,2.2,16.9,2.2,27.9h0V483h19.5V396.3a131.41,131.41,0,0,0-3-29.1,61.1,61.1,0,0,0-10-22.7A45.29,45.29,0,0,0,881.3,330c-7.9-3.4-17.8-5.1-29.5-5.1q-21.3,0-36,3t-23.4,5.4h0V483Zm217.1,3.3a100.28,100.28,0,0,0,27.2-3.3c7.7-2.2,12.9-4.1,15.8-5.7h0l-3.6-16.8a105.18,105.18,0,0,1-13.5,5.1q-9.3,3-25.2,3-28.8,0-42-15.3t-14.1-43.8h108.9c.2-1.4.3-2.9.4-4.5s.2-3.2.2-4.8q0-38.7-17-57.3t-45.4-18.6a65.24,65.24,0,0,0-25,5A61.35,61.35,0,0,0,974,344.4a77.5,77.5,0,0,0-15.3,25.4c-3.9,10.1-5.8,22-5.8,35.5a119.68,119.68,0,0,0,4.2,32.6,66.21,66.21,0,0,0,13.5,25.6,62.29,62.29,0,0,0,23.7,16.8C1003.7,484.3,1015.3,486.3,1028.9,486.3Zm33.9-93.3H974a70.46,70.46,0,0,1,4-19.5,51.72,51.72,0,0,1,9.6-16.4,47.46,47.46,0,0,1,14.4-11.2,41,41,0,0,1,18.8-4.2q19.8,0,30.6,13.5t11.4,37.8Zm65.3,90c2.4-4.4,5.3-9.5,8.7-15.1s7.1-11.6,11.2-17.9,8.3-12.5,12.8-18.9,8.8-12.5,13.2-18.3c4.2,5.8,8.6,11.9,13.1,18.3s8.8,12.7,12.9,18.9,7.9,12.1,11.2,17.9,6.3,10.8,8.7,15.1h21c-3.8-7.4-8-14.9-12.5-22.5s-9.1-15-13.9-22-9.6-14-14.4-20.6-9.3-12.7-13.5-18.3h0l49.5-71.7h-21.3L1174,387.3l-40.2-59.4H1111l50.4,72.9q-14.1,19.2-27.6,39.2a474.65,474.65,0,0,0-25.8,43h20.1Zm195.2,3.3a72.65,72.65,0,0,0,22.8-3.4c7-2.3,11.9-4.4,14.7-6.1h0l-4.8-16.2a75.87,75.87,0,0,1-11.7,5.2c-5,1.8-11.6,2.9-19.8,2.9a54.4,54.4,0,0,1-13.2-1.5,20.45,20.45,0,0,1-10.2-6c-2.8-3-4.9-7.2-6.4-12.8s-2.2-12.6-2.2-21.5h0V344.4h61.8V327.9h-61.8V278.7l-19.5,3.6V425.1a132.63,132.63,0,0,0,2.4,27c1.6,7.6,4.3,13.9,8.2,19a34.92,34.92,0,0,0,15.6,11.4C1305.7,485,1313.7,486.3,1323.3,486.3Zm107.9-80.7V386.7h-67.8v18.9ZM1474,296.1a14.2,14.2,0,0,0,10.2-4.1c2.8-2.7,4.2-6.3,4.2-10.9s-1.4-8.2-4.2-11a14.11,14.11,0,0,0-10.2-4,14.53,14.53,0,0,0-10.2,4c-2.8,2.7-4.2,6.4-4.2,11s1.4,8.2,4.2,10.9A13.8,13.8,0,0,0,1474,296.1Zm9.9,186.9V327.9h-19.5V483Zm70.1,0V346.8c2-.8,6.3-1.7,13.1-2.7a163.34,163.34,0,0,1,23.8-1.5c8.6,0,15.8,1,21.4,3.1a28.62,28.62,0,0,1,13.8,10.4q5.25,7.2,7.5,18.6c1.5,7.6,2.2,16.9,2.2,27.9h0V483h19.5V396.3a131.41,131.41,0,0,0-3-29.1,58.17,58.17,0,0,0-10.1-22.7,45.29,45.29,0,0,0-18.9-14.5c-7.9-3.4-17.8-5.1-29.5-5.1q-21.3,0-36,3t-23.4,5.4h0V483Zm199.4,3.3a72.65,72.65,0,0,0,22.8-3.4c7-2.3,11.9-4.4,14.7-6.1h0l-4.8-16.2a75.87,75.87,0,0,1-11.7,5.2c-5,1.8-11.6,2.9-19.8,2.9a54.4,54.4,0,0,1-13.2-1.5,20.45,20.45,0,0,1-10.2-6c-2.8-3-4.9-7.2-6.4-12.8s-2.2-12.6-2.2-21.5h0V344.4h61.8V327.9h-61.8V278.7l-19.5,3.6V425.1a132.63,132.63,0,0,0,2.4,27c1.6,7.6,4.3,13.9,8.2,19a34.92,34.92,0,0,0,15.6,11.4C1735.8,485,1743.8,486.3,1753.4,486.3Zm105.2-.6,2.7-16.2a90.28,90.28,0,0,1-10.4-2.1,15.3,15.3,0,0,1-7-3.8,15.7,15.7,0,0,1-4.1-6.9,40.44,40.44,0,0,1-1.3-11.5h0v-195l-19.5,3.6v192c0,7.4.8,13.6,2.6,18.5a29.28,29.28,0,0,0,7.5,12,30.81,30.81,0,0,0,12.3,6.9,65.79,65.79,0,0,0,17.2,2.5Z"
11+
d="M184.317 93.257V52.42c.6-.24 1.92-.51 3.898-.81a49.417 49.417 0 0 1 7.166-.45c2.579 0 4.738.3 6.447.93a8.581 8.581 0 0 1 4.138 3.118c1.05 1.44 1.799 3.299 2.248 5.577.45 2.28.66 5.068.66 8.366v24.107h5.847V67.261a39.402 39.402 0 0 0-.9-8.725 18.32 18.32 0 0 0-2.998-6.807 13.58 13.58 0 0 0-5.667-4.348c-2.369-1.019-5.337-1.529-8.845-1.529-4.258 0-7.856.3-10.794.9-2.939.6-5.278 1.14-7.017 1.619v44.886h5.817Zm65.096.99a30.068 30.068 0 0 0 8.155-.99c2.309-.66 3.868-1.23 4.738-1.709l-1.08-5.037a31.537 31.537 0 0 1-4.048 1.529c-1.859.6-4.377.9-7.556.9-5.756 0-9.954-1.53-12.593-4.588-2.638-3.059-4.048-7.436-4.228-13.133h32.653c.06-.42.09-.87.12-1.35.03-.48.06-.959.06-1.439 0-7.736-1.7-13.463-5.097-17.18-3.399-3.719-7.936-5.578-13.613-5.578-2.573.002-5.12.512-7.496 1.5a18.395 18.395 0 0 0-6.477 4.527 23.238 23.238 0 0 0-4.587 7.616c-1.17 3.029-1.74 6.597-1.74 10.644-.031 3.301.393 6.59 1.26 9.775a19.852 19.852 0 0 0 4.048 7.676 18.677 18.677 0 0 0 7.106 5.038c2.819 1.199 6.297 1.799 10.375 1.799Zm10.164-27.976h-26.626a21.127 21.127 0 0 1 1.2-5.846 15.508 15.508 0 0 1 2.878-4.918 14.23 14.23 0 0 1 4.318-3.358 12.293 12.293 0 0 1 5.637-1.26c3.958 0 7.016 1.35 9.175 4.048 2.159 2.699 3.298 6.477 3.418 11.334Zm19.58 26.986c.72-1.32 1.589-2.848 2.608-4.527 1.02-1.68 2.13-3.479 3.359-5.368a189.287 189.287 0 0 1 3.838-5.667c1.349-1.919 2.638-3.748 3.957-5.487 1.26 1.74 2.58 3.568 3.928 5.487a240.442 240.442 0 0 1 3.868 5.667c1.23 1.86 2.37 3.628 3.359 5.368.989 1.739 1.889 3.238 2.608 4.527h6.297a128.627 128.627 0 0 0-3.748-6.746c-1.35-2.28-2.729-4.498-4.168-6.597-1.44-2.099-2.878-4.198-4.318-6.177a465.754 465.754 0 0 0-4.048-5.487l14.843-21.498h-6.387l-12.234 17.81-12.053-17.81h-6.836L289.14 68.61a362.302 362.302 0 0 0-8.275 11.754 142.32 142.32 0 0 0-7.736 12.893h6.027Zm58.529.99a21.783 21.783 0 0 0 6.836-1.02c2.099-.69 3.568-1.32 4.408-1.829l-1.44-4.857a22.749 22.749 0 0 1-3.508 1.559c-1.499.54-3.478.87-5.936.87a16.311 16.311 0 0 1-3.958-.45 6.132 6.132 0 0 1-3.059-1.8c-.84-.899-1.469-2.158-1.919-3.837-.45-1.68-.66-3.778-.66-6.447V51.699h18.53v-4.947h-18.53V32l-5.846 1.08v42.816a39.768 39.768 0 0 0 .72 8.096c.48 2.279 1.289 4.168 2.458 5.697a10.47 10.47 0 0 0 4.678 3.418c1.948.75 4.347 1.14 7.226 1.14Zm32.353-24.198v-5.667h-20.33v5.667h20.33Zm12.833-32.832a4.258 4.258 0 0 0 3.058-1.23c.84-.809 1.26-1.888 1.26-3.268 0-1.379-.42-2.458-1.26-3.298a4.23 4.23 0 0 0-3.058-1.2 4.357 4.357 0 0 0-3.059 1.2c-.84.81-1.259 1.919-1.259 3.298 0 1.38.42 2.459 1.26 3.269a4.138 4.138 0 0 0 3.058 1.229Zm2.968 56.04V46.752h-5.847v46.505h5.847Zm21.019 0V52.42c.6-.24 1.889-.51 3.928-.81a48.976 48.976 0 0 1 7.136-.45c2.579 0 4.738.3 6.417.93a8.581 8.581 0 0 1 4.137 3.118c1.05 1.44 1.8 3.299 2.25 5.577.449 2.28.659 5.068.659 8.366v24.107h5.847V67.261a39.402 39.402 0 0 0-.9-8.725 17.442 17.442 0 0 0-3.028-6.807 13.58 13.58 0 0 0-5.667-4.348c-2.369-1.019-5.337-1.529-8.845-1.529-4.258 0-7.856.3-10.795.9-2.938.6-5.277 1.14-7.016 1.619v44.886h5.877Zm59.788.99a21.783 21.783 0 0 0 6.837-1.02c2.098-.69 3.568-1.32 4.407-1.829l-1.439-4.857a22.749 22.749 0 0 1-3.508 1.559c-1.5.54-3.478.87-5.937.87a16.311 16.311 0 0 1-3.958-.45 6.132 6.132 0 0 1-3.058-1.8c-.84-.899-1.47-2.158-1.92-3.837-.449-1.68-.659-3.778-.659-6.447V51.699h18.53v-4.947h-18.53V32l-5.847 1.08v42.816a39.768 39.768 0 0 0 .72 8.096c.48 2.279 1.29 4.168 2.459 5.697a10.47 10.47 0 0 0 4.677 3.418c1.949.75 4.348 1.14 7.226 1.14Zm31.543-.18.81-4.858a27.07 27.07 0 0 1-3.118-.63 4.588 4.588 0 0 1-2.1-1.139 4.707 4.707 0 0 1-1.229-2.069 12.126 12.126 0 0 1-.39-3.448V23.454l-5.846 1.08v57.569c0 2.219.24 4.078.78 5.547a8.78 8.78 0 0 0 2.248 3.598 9.238 9.238 0 0 0 3.688 2.07c1.679.476 3.413.728 5.157.749Z"
1212
fill="currentColor"
13-
transform="translate(-197.5 -171.5)"
13+
fillRule="nonzero"
1414
/>
15-
<g>
15+
<g transform="translate(3.272 2.88)">
1616
<path
17-
d="M528.8,509q-6.3,6-13.2,11.4a190,190,0,1,1,38-40.2"
18-
fill="none"
19-
stroke="#5fc3e7"
20-
strokeWidth="18"
21-
transform="translate(-197.5 -171.5)"
17+
d="M96.19 98.498a53.922 53.922 0 0 1-3.958 3.418c-23.445 18.476-57.176 15.723-77.314-6.31-20.139-22.035-19.854-55.877.651-77.57C36.075-3.657 69.848-5.843 92.98 13.025c23.131 18.867 27.82 51.892 10.69 76.339"
18+
stroke="var(--logo-color)"
19+
strokeWidth="5.4"
2220
/>
23-
<circle cx="329.2" cy="339.5" fill="#5fc3e7" r="9" />
24-
<line
25-
fill="none"
26-
stroke="#5fc3e7"
21+
<circle
22+
cx="95.561"
23+
cy="99.097"
24+
fill="var(--logo-color)"
25+
fillRule="nonzero"
26+
r="2.699"
27+
/>
28+
<path
29+
d="M8.847 28.785c16.248-1.974 32.318-2.949 48.211-2.923 15.893.025 31.156 1.05 45.789 3.073"
30+
stroke="var(--logo-color)"
2731
strokeLinecap="square"
28-
strokeWidth="18"
29-
x1="40"
30-
x2="353.5"
31-
y1="105"
32-
y2="105.5"
32+
strokeWidth="5.4"
3333
/>
3434
<ellipse
35-
cx="202"
36-
cy="199.5"
37-
fill="none"
38-
rx="93.5"
39-
ry="190.5"
40-
stroke="#5fc3e7"
41-
strokeWidth="18"
35+
cx="57.421"
36+
cy="57.12"
37+
rx="28.035"
38+
ry="57.12"
39+
stroke="var(--logo-color)"
40+
strokeWidth="5.4"
4241
/>
43-
<line
44-
fill="none"
45-
stroke="#5fc3e7"
46-
strokeLinecap="square"
47-
strokeWidth="18"
48-
x1="49.5"
49-
x2="353.5"
50-
y1="304.5"
51-
y2="304.5"
52-
/>
53-
<line
54-
fill="none"
55-
stroke="#5fc3e7"
42+
<path
43+
d="M11.695 88.603c14.934 2 30.008 3 45.224 3 15.215 0 30.525-1 45.928-3M1.009 59.069h112.482"
44+
stroke="var(--logo-color)"
5645
strokeLinecap="square"
57-
strokeWidth="18"
58-
x1="9"
59-
x2="389"
60-
y1="206"
61-
y2="206"
46+
strokeWidth="5.4"
6247
/>
6348
</g>
6449
</g>

0 commit comments

Comments
 (0)