use-intl 3.23.5 → 3.24.0
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 +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ export default function UserProfile({user}) {
|
|
|
35
35
|
// en.json
|
|
36
36
|
{
|
|
37
37
|
"UserProfile": {
|
|
38
|
-
"title": "{
|
|
38
|
+
"title": "{firstName}'s profile",
|
|
39
39
|
"membership": "Member since {memberSince, date, short}",
|
|
40
40
|
"followers": "{count, plural, ↵
|
|
41
41
|
=0 {No followers yet} ↵
|
|
@@ -60,21 +60,21 @@ import {IntlProvider, useTranslations} from 'use-intl';
|
|
|
60
60
|
// along with your app once you have the messages.
|
|
61
61
|
const messages = {
|
|
62
62
|
App: {
|
|
63
|
-
hello: 'Hello {
|
|
63
|
+
hello: 'Hello {firstName}!'
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
function Root() {
|
|
68
68
|
return (
|
|
69
69
|
<IntlProvider messages={messages} locale="en">
|
|
70
|
-
<App user={{
|
|
70
|
+
<App user={{firstName: 'Jane'}} />
|
|
71
71
|
</IntlProvider>
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function App({user}) {
|
|
76
76
|
const t = useTranslations('App');
|
|
77
|
-
return <h1>{t('hello', {
|
|
77
|
+
return <h1>{t('hello', {firstName: user.firstName})}</h1>;
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-intl",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.24.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"description": "Internationalization (i18n) for React",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"intl-messageformat": "^10.5.14"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
71
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "fdcfa24aa7da58bb84c79692a98b0c4e163f87dd"
|
|
74
74
|
}
|