next-intl 4.5.2 → 4.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<
|
|
1
|
+
<p align="center">
|
|
2
2
|
<br>
|
|
3
3
|
<a href="https://next-intl.dev">
|
|
4
4
|
<picture>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
</a>
|
|
10
10
|
<br>
|
|
11
11
|
<br>
|
|
12
|
-
</
|
|
12
|
+
</p>
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Internationalization for Next.js.
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function getSortedMessages(messages) {
|
|
2
|
-
return messages.toSorted((
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
return
|
|
2
|
+
return messages.toSorted((messageA, messageB) => {
|
|
3
|
+
const pathA = messageA.references?.[0]?.path ?? '';
|
|
4
|
+
const pathB = messageB.references?.[0]?.path ?? '';
|
|
5
|
+
if (pathA === pathB) {
|
|
6
|
+
return messageA.id.localeCompare(messageB.id);
|
|
7
7
|
} else {
|
|
8
|
-
return
|
|
8
|
+
return pathA.localeCompare(pathB);
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return e.toSorted(((e,r)=>{const
|
|
1
|
+
function e(e){return e.toSorted(((e,r)=>{const o=e.references?.[0]?.path??"",t=r.references?.[0]?.path??"";return o===t?e.id.localeCompare(r.id):o.localeCompare(t)}))}export{e as getSortedMessages};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intl",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"funding": [
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"@formatjs/intl-localematcher": "^0.5.4",
|
|
128
128
|
"@swc/core": "^1.13.19",
|
|
129
129
|
"negotiator": "^1.0.0",
|
|
130
|
-
"use-intl": "^4.5.
|
|
130
|
+
"use-intl": "^4.5.3"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"next": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
"optional": true
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
-
"gitHead": "
|
|
142
|
+
"gitHead": "39bf801f0115dcd1700b4720dda1f46b53d3aec1"
|
|
143
143
|
}
|