use-intl 2.13.0-beta.2 → 2.13.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/LICENSE +21 -0
- package/dist/core/{IntlConfiguration.d.ts → IntlConfig.d.ts} +12 -5
- package/dist/core/createBaseTranslator.d.ts +2 -2
- package/dist/core/createIntl.d.ts +1 -1
- package/dist/core/createTranslator.d.ts +3 -3
- package/dist/core/createTranslatorImpl.d.ts +2 -2
- package/dist/core/use-intl.esm.js +38 -11
- package/dist/core/use-intl.esm.js.map +1 -1
- package/dist/core/use-intl.esm2.js +38 -41
- package/dist/core/use-intl.esm2.js.map +1 -1
- package/dist/core/use-intl.esm3.js +151 -35
- package/dist/core/use-intl.esm3.js.map +1 -1
- package/dist/core/use-intl.esm4.js +8 -148
- package/dist/core/use-intl.esm4.js.map +1 -1
- package/dist/core/use-intl.esm5.js +56 -12
- package/dist/core/use-intl.esm5.js.map +1 -1
- package/dist/core/use-intl.esm6.js +12 -56
- package/dist/core/use-intl.esm6.js.map +1 -1
- package/dist/core/use-intl.esm7.js +2 -2
- package/dist/core/use-intl.esm7.js.map +1 -1
- package/dist/core/use-intl.esm9.js +1 -1
- package/dist/react/IntlContext.d.ts +2 -2
- package/dist/react/IntlProvider.d.ts +7 -2
- package/dist/react/getInitializedConfig.d.ts +5 -0
- package/dist/react/use-intl.esm.js +3 -3
- package/dist/react/use-intl.esm.js.map +1 -1
- package/dist/react/use-intl.esm10.js +1 -1
- package/dist/react/use-intl.esm2.js +21 -3
- package/dist/react/use-intl.esm2.js.map +1 -1
- package/dist/react/use-intl.esm3.js +3 -28
- package/dist/react/use-intl.esm3.js.map +1 -1
- package/dist/react/use-intl.esm5.js +3 -20
- package/dist/react/use-intl.esm5.js.map +1 -1
- package/dist/react/use-intl.esm6.js +19 -20
- package/dist/react/use-intl.esm6.js.map +1 -1
- package/dist/react/use-intl.esm7.js +28 -3
- package/dist/react/use-intl.esm7.js.map +1 -1
- package/dist/react/use-intl.esm8.js +3 -30
- package/dist/react/use-intl.esm8.js.map +1 -1
- package/dist/react/use-intl.esm9.js +30 -3
- package/dist/react/use-intl.esm9.js.map +1 -1
- package/dist/react/useFormatter.d.ts +1 -1
- package/dist/react/useIntl.d.ts +2 -2
- package/dist/react/useIntlContext.d.ts +1 -1
- package/dist/src/core/{IntlConfiguration.d.ts → IntlConfig.d.ts} +12 -5
- package/dist/src/core/IntlConfig.js +2 -0
- package/dist/src/core/IntlConfig.js.map +1 -0
- package/dist/src/core/createBaseTranslator.d.ts +2 -2
- package/dist/src/core/createBaseTranslator.js.map +1 -1
- package/dist/src/core/createTranslator.d.ts +3 -3
- package/dist/src/core/createTranslatorImpl.d.ts +2 -2
- package/dist/src/core/createTranslatorImpl.js.map +1 -1
- package/dist/src/react/IntlContext.d.ts +2 -2
- package/dist/src/react/IntlContext.js.map +1 -1
- package/dist/src/react/IntlProvider.d.ts +7 -2
- package/dist/src/react/IntlProvider.js +2 -2
- package/dist/src/react/IntlProvider.js.map +1 -1
- package/dist/src/react/getInitializedConfig.d.ts +5 -0
- package/dist/src/react/{getIntlContextValue.js → getInitializedConfig.js} +2 -2
- package/dist/src/react/getInitializedConfig.js.map +1 -0
- package/dist/src/react/useIntl.d.ts +1 -1
- package/dist/src/react/useIntl.js +1 -1
- package/dist/src/react/useIntl.js.map +1 -1
- package/dist/src/react/useIntlContext.d.ts +1 -1
- package/dist/use-intl.cjs.development.js +3 -3
- package/dist/use-intl.cjs.development.js.map +1 -1
- package/dist/use-intl.cjs.production.min.js.map +1 -1
- package/dist/use-intl.esm.js +9 -9
- package/package.json +3 -2
- package/src/core/{IntlConfiguration.tsx → IntlConfig.tsx} +14 -6
- package/src/core/createBaseTranslator.tsx +7 -8
- package/src/core/createTranslator.tsx +3 -3
- package/src/core/createTranslatorImpl.tsx +8 -6
- package/src/react/IntlContext.tsx +2 -2
- package/src/react/IntlProvider.tsx +9 -5
- package/src/react/{getIntlContextValue.tsx → getInitializedConfig.tsx} +9 -4
- package/src/react/useIntl.tsx +1 -1
- package/CHANGELOG.md +0 -542
- package/dist/react/IntlContextValue.d.ts +0 -19
- package/dist/react/IntlProviderProps.d.ts +0 -15
- package/dist/react/getIntlContextValue.d.ts +0 -13
- package/dist/src/core/IntlConfiguration.js +0 -2
- package/dist/src/core/IntlConfiguration.js.map +0 -1
- package/dist/src/react/IntlContextValue.d.ts +0 -19
- package/dist/src/react/IntlContextValue.js +0 -2
- package/dist/src/react/IntlContextValue.js.map +0 -1
- package/dist/src/react/IntlProviderProps.d.ts +0 -15
- package/dist/src/react/IntlProviderProps.js +0 -2
- package/dist/src/react/IntlProviderProps.js.map +0 -1
- package/dist/src/react/getIntlContextValue.d.ts +0 -13
- package/dist/src/react/getIntlContextValue.js.map +0 -1
- package/src/react/IntlContextValue.tsx +0 -21
- package/src/react/IntlProviderProps.tsx +0 -17
package/CHANGELOG.md
DELETED
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# 2.12.0 (2023-03-25)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* Add `BigInt` support for `useFormatter.format()` by [@tacomanator](https://github.com/tacomanator) ([#222](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/222)) ([a5ded6c](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/a5ded6c4cd706d5361556865050c5948a4d78887))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# 2.11.0 (2023-03-06)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
* Add `useFormatter` (replaces `useIntl`) ([#209](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/209)) ([021b682](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/021b682aa00063b040ccf1c927111780c1f0a710))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## 2.10.4 (2023-02-20)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Bug Fixes
|
|
32
|
-
|
|
33
|
-
* Return up-to-date translations when messages change ([#199](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/199)) ([78f39b4](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/78f39b408933d6fcbb38d085704bfbe14065dc0a))
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## 2.10.3 (2023-02-19)
|
|
40
|
-
|
|
41
|
-
**Note:** Version bump only for package use-intl
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## 2.10.2 (2022-12-09)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
### Bug Fixes
|
|
51
|
-
|
|
52
|
-
* Remove magic `__DEV__` global ([#151](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/151)) ([7d5aa6a](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/7d5aa6a8fda0189adc6440214270e07a5593d98f))
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## 2.10.1 (2022-12-09)
|
|
59
|
-
|
|
60
|
-
**Note:** Version bump only for package use-intl
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
# 2.10.0 (2022-12-09)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Features
|
|
70
|
-
|
|
71
|
-
* Add support for using `next-intl` in the `app` folder with Next.js 13 (see https://next-intl-docs.vercel.app/docs/next-13, [#144](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/144)) ([18c94d6](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/18c94d623a05afa7710fea83360f12f9811fb38d))
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## 2.9.2 (2022-12-08)
|
|
78
|
-
|
|
79
|
-
**Note:** Version bump only for package use-intl
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
## 2.9.1 (2022-11-03)
|
|
86
|
-
|
|
87
|
-
**Note:** Version bump only for package use-intl
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
# 2.9.0 (2022-10-27)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### Features
|
|
97
|
-
|
|
98
|
-
* Next.js 13 compatibility ([#140](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/140)) ([65326a0](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/65326a0b47980f260df466a283a6e7a0aa5e1cd0)), closes [#139](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/139)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
# 2.8.0 (2022-10-18)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### Features
|
|
108
|
-
|
|
109
|
-
* Provide `createTranslator` and `createIntl` by extracting a React-agnostic core library. Thanks to David Brands from Marvia for sponsoring the work on this feature, participating in discussion and providing feedback! ([#137](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/137)) ([91f7489](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/91f748972008b8587553b48aa36c95d7348b4b0c))
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
## 2.7.6 (2022-09-22)
|
|
116
|
-
|
|
117
|
-
**Note:** Version bump only for package use-intl
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
## 2.7.5 (2022-08-30)
|
|
124
|
-
|
|
125
|
-
**Note:** Version bump only for package use-intl
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
## 2.7.4 (2022-05-30)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
### Bug Fixes
|
|
135
|
-
|
|
136
|
-
* Adapt TypeScript validation to work with messages files that only have a single top-level namespace ([#115](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/115)) ([cf0b83e](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/cf0b83e3a591cfe87e17537c3ca0c7000cc70b1e))
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
## 2.7.3 (2022-05-20)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
### Bug Fixes
|
|
146
|
-
|
|
147
|
-
* Add back the ability to render the provider without messages ([#113](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/113)) ([8395822](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/8395822fa17cd0a04b88f8edce3b20e5e613fc78))
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## 2.7.2 (2022-05-10)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
### Bug Fixes
|
|
157
|
-
|
|
158
|
-
* Enable tree-shaking ([#108](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/108)) ([157b0e2](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/157b0e28376055e7e34e86007c51d008c8e214aa))
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
## 2.7.1 (2022-04-28)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
### Bug Fixes
|
|
168
|
-
|
|
169
|
-
* Allow null message values ([#110](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/110)) ([14ae8ff](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/14ae8ffdf1b295873f14081e2c3709d0f9bd2b9e))
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
# 2.7.0 (2022-04-28)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Features
|
|
179
|
-
|
|
180
|
-
* Warn for invalid namespace keys ([#106](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/106)) ([e86ab28](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/e86ab28b9180b866ce1a0a9173355d4b686b7d07))
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
# 2.6.0 (2022-04-08)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
### Features
|
|
190
|
-
|
|
191
|
-
* Support React 18 ([#98](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/98)) ([38614eb](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/38614eb9c6d6fb96704424d7f3ff8a67a24b789e))
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
# 2.5.0 (2022-04-01)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
### Features
|
|
201
|
-
|
|
202
|
-
* Type safe messages ([#93](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/93)) ([13b49b1](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/13b49b138bc0ec3adbe661af6a70dfabfe7e86b0))
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
## 2.4.1 (2022-03-24)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
### Bug Fixes
|
|
216
|
-
|
|
217
|
-
* Overwrite prerelease ([6caf5c4](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/6caf5c48a35179f802503bc6580469187765c837))
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
# [2.4.0](https://github.com/amannn/next-intl/tree/main/packages/use-intl/compare/v2.3.5...v2.4.0) (2022-02-08)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
### Features
|
|
227
|
-
|
|
228
|
-
* Default translation values ([#86](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/86)) ([0ed5e70](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/0ed5e70ffc57dcdb1b7b9270dbce9e8475b3f478))
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
## 2.3.5 (2022-01-19)
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
### Bug Fixes
|
|
238
|
-
|
|
239
|
-
* Support identical wrappers with identical text content in rich text ([#80](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/80)) ([b35bb9f](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/b35bb9ffc5fa56c6260b6b424be3cd875f199aef))
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
## 2.3.4 (2022-01-04)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
### Bug Fixes
|
|
249
|
-
|
|
250
|
-
* Allow usage outside of Next.js (e.g. Jest and Storybook) ([#76](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/76)) ([7c6925b](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/7c6925b39338be95c1c940c67a1ae2f5e3f85cdd))
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
## 2.3.3 (2021-12-23)
|
|
257
|
-
|
|
258
|
-
**Note:** Version bump only for package use-intl
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
## 2.3.2 (2021-12-23)
|
|
265
|
-
|
|
266
|
-
**Note:** Version bump only for package use-intl
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
## 2.3.1 (2021-12-23)
|
|
273
|
-
|
|
274
|
-
**Note:** Version bump only for package use-intl
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
# 2.3.0 (2021-11-24)
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
### Features
|
|
284
|
-
|
|
285
|
-
* Add `useLocale` and `useTimeZone` ([#67](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/67)) ([7833f4a](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/7833f4adc1aadc937cbaa550a968ef6f7b4f5ee1))
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
## 2.2.1 (2021-11-23)
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
### Bug Fixes
|
|
295
|
-
|
|
296
|
-
* Clearer error message when no messages are provided ([#66](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/66)) ([742729a](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/742729aaddd63367efc2b79ef0cdf93545abdfb0))
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
# 2.2.0 (2021-11-02)
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
### Features
|
|
306
|
-
|
|
307
|
-
* TypeScript improvements: Use enum type for `style` of `NumberFormatOptions`, only allow passing React children to messages rendered with `t.rich` and update `tslib` ([#63](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/63)) ([d73e935](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/d73e9358bf13c87c0a653bd9fbed35e41548ff1d))
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
## 2.1.1 (2021-10-28)
|
|
314
|
-
|
|
315
|
-
**Note:** Version bump only for package use-intl
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
# 2.1.0 (2021-10-27)
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
### Features
|
|
325
|
-
|
|
326
|
-
* Support Next.js 12 ([#61](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/61)) ([0391cc8](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/0391cc85d3401bca9df29080a569957f6be93c85))
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
## 2.0.5 (2021-09-28)
|
|
333
|
-
|
|
334
|
-
**Note:** Version bump only for package use-intl
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
## 2.0.4 (2021-09-28)
|
|
341
|
-
|
|
342
|
-
**Note:** Version bump only for package use-intl
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
## 2.0.3 (2021-09-17)
|
|
349
|
-
|
|
350
|
-
**Note:** Version bump only for package use-intl
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
## 2.0.2 (2021-09-17)
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
### Bug Fixes
|
|
360
|
-
|
|
361
|
-
* Render correct messages when the namespace changes in `useTranslations` ([#58](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/58)) ([b8f7dab](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/b8f7dab0e3a213a91bdcd7929547cd01ba0b5f54))
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
## 2.0.1 (2021-09-04)
|
|
368
|
-
|
|
369
|
-
**Note:** Version bump only for package use-intl
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
# 2.0.0 (2021-08-26)
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
* feat!: Use a separate API for rich text formatting to avoid type casting in TypeScript #54 ([4c13a64](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/4c13a644ce99992d9e57887afe35a09b8e3d6572)), closes [#54](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/54)
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
### BREAKING CHANGES
|
|
382
|
-
|
|
383
|
-
* Instead of using the `t` function for formatting both regular messages and rich text, this function will only work for regular messages now. For rich text you can use `t.rich` instead now.
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
## 1.5.1 (2021-08-13)
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
### Bug Fixes
|
|
393
|
-
|
|
394
|
-
* Improve API for rendering raw messages and add docs ([#51](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/51)) ([19f4a7e](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/19f4a7e4e81e1cff78dc7e3f337dce69800be280))
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
# 1.5.0 (2021-08-10)
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
### Features
|
|
404
|
-
|
|
405
|
-
* Add flag to return raw messages ([#48](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/48)) ([b34e19f](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/b34e19ff618308b7d0c01e7969975215d96ff608))
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
## 1.4.7 (2021-08-02)
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
### Bug Fixes
|
|
415
|
-
|
|
416
|
-
* Adjust default for `onError` of the provider to log errors correctly ([#46](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/46)) ([d0a1986](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/d0a1986905e30acac40630e9ea6d099caad617fb))
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
## 1.4.6 (2021-08-02)
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
### Bug Fixes
|
|
426
|
-
|
|
427
|
-
* Use `timeZone` in translation function from `useTranslations` ([#45](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/45)) ([ebf75f2](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/ebf75f2add0ddc46f89768e9481bb16c56f94720))
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
## 1.4.5 (2021-07-26)
|
|
434
|
-
|
|
435
|
-
**Note:** Version bump only for package use-intl
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
## 1.4.4 (2021-07-08)
|
|
442
|
-
|
|
443
|
-
**Note:** Version bump only for package use-intl
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
## 1.4.3 (2021-07-08)
|
|
450
|
-
|
|
451
|
-
**Note:** Version bump only for package use-intl
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
## [1.4.2](https://github.com/amannn/next-intl/tree/main/packages/use-intl/compare/v1.4.1...v1.4.2) (2021-06-16)
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
### Bug Fixes
|
|
461
|
-
|
|
462
|
-
* Don't require `react-dom` as a peer dependency ([#39](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/39)) ([39edfcd](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/39edfcd9091e09570fc2152cda6a1e9ae5e7c210))
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
## 1.3.11 (2021-05-07)
|
|
469
|
-
|
|
470
|
-
**Note:** Version bump only for package use-intl
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
## 1.3.10 (2021-05-02)
|
|
477
|
-
|
|
478
|
-
**Note:** Version bump only for package use-intl
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
## 1.3.9 (2021-05-02)
|
|
485
|
-
|
|
486
|
-
**Note:** Version bump only for package use-intl
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
## 1.3.8 (2021-03-26)
|
|
493
|
-
|
|
494
|
-
**Note:** Version bump only for package use-intl
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
## 1.3.7 (2021-02-12)
|
|
501
|
-
|
|
502
|
-
**Note:** Version bump only for package use-intl
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
## 1.3.6 (2021-02-09)
|
|
509
|
-
|
|
510
|
-
**Note:** Version bump only for package use-intl
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
## 1.3.5 (2021-02-09)
|
|
517
|
-
|
|
518
|
-
**Note:** Version bump only for package use-intl
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
## 1.3.4 (2021-02-09)
|
|
525
|
-
|
|
526
|
-
**Note:** Version bump only for package use-intl
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
## [1.3.3](https://github.com/amannn/next-intl/tree/main/packages/use-intl/compare/v1.3.2...v1.3.3) (2021-02-09)
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
### Bug Fixes
|
|
536
|
-
|
|
537
|
-
* Update DateTimeFormatOptions ([#29](https://github.com/amannn/next-intl/tree/main/packages/use-intl/issues/29)) ([91a8f52](https://github.com/amannn/next-intl/tree/main/packages/use-intl/commit/91a8f5216a9ef2a0e76be6e3e8bd706f5c7496a3))
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
## Previous releases
|
|
541
|
-
|
|
542
|
-
See [next-intl changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md).
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import AbstractIntlMessages from '../core/AbstractIntlMessages';
|
|
2
|
-
import Formats from '../core/Formats';
|
|
3
|
-
import IntlError from '../core/IntlError';
|
|
4
|
-
import { RichTranslationValues } from '../core/TranslationValues';
|
|
5
|
-
declare type IntlContextValue = {
|
|
6
|
-
messages?: AbstractIntlMessages;
|
|
7
|
-
locale: string;
|
|
8
|
-
formats?: Partial<Formats>;
|
|
9
|
-
timeZone?: string;
|
|
10
|
-
onError(error: IntlError): void;
|
|
11
|
-
getMessageFallback(info: {
|
|
12
|
-
error: IntlError;
|
|
13
|
-
key: string;
|
|
14
|
-
namespace?: string;
|
|
15
|
-
}): string;
|
|
16
|
-
now?: Date;
|
|
17
|
-
defaultTranslationValues?: RichTranslationValues;
|
|
18
|
-
};
|
|
19
|
-
export default IntlContextValue;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AbstractIntlMessages } from '../core';
|
|
3
|
-
import IntlConfiguration from '../core/IntlConfiguration';
|
|
4
|
-
import { RichTranslationValues } from '../core/TranslationValues';
|
|
5
|
-
declare type IntlProviderProps = IntlConfiguration & {
|
|
6
|
-
/** All components that use the provided hooks should be within this tree. */
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
/** Global default values for translation values and rich text elements.
|
|
9
|
-
* Can be used for consistent usage or styling of rich text elements.
|
|
10
|
-
* Defaults will be overidden by locally provided values. */
|
|
11
|
-
defaultTranslationValues?: RichTranslationValues;
|
|
12
|
-
/** All messages that will be available in your components. */
|
|
13
|
-
messages?: AbstractIntlMessages;
|
|
14
|
-
};
|
|
15
|
-
export default IntlProviderProps;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import IntlProviderProps from './IntlProviderProps';
|
|
2
|
-
/**
|
|
3
|
-
* Enhances the incoming props with defaults.
|
|
4
|
-
*/
|
|
5
|
-
export default function getIntlContextValue<Props extends Omit<IntlProviderProps, 'children'>>({ getMessageFallback, messages, onError, ...rest }: Props): Omit<Props, "onError" | "getMessageFallback" | "messages"> & {
|
|
6
|
-
messages: import("../core/AbstractIntlMessages").default | undefined;
|
|
7
|
-
onError: (error: import("..").IntlError) => void;
|
|
8
|
-
getMessageFallback: (info: {
|
|
9
|
-
error: import("..").IntlError;
|
|
10
|
-
key: string;
|
|
11
|
-
namespace?: string | undefined;
|
|
12
|
-
}) => string;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IntlConfiguration.js","sourceRoot":"","sources":["../../../src/core/IntlConfiguration.tsx"],"names":[],"mappings":""}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import AbstractIntlMessages from '../core/AbstractIntlMessages';
|
|
2
|
-
import Formats from '../core/Formats';
|
|
3
|
-
import IntlError from '../core/IntlError';
|
|
4
|
-
import { RichTranslationValues } from '../core/TranslationValues';
|
|
5
|
-
declare type IntlContextValue = {
|
|
6
|
-
messages?: AbstractIntlMessages;
|
|
7
|
-
locale: string;
|
|
8
|
-
formats?: Partial<Formats>;
|
|
9
|
-
timeZone?: string;
|
|
10
|
-
onError(error: IntlError): void;
|
|
11
|
-
getMessageFallback(info: {
|
|
12
|
-
error: IntlError;
|
|
13
|
-
key: string;
|
|
14
|
-
namespace?: string;
|
|
15
|
-
}): string;
|
|
16
|
-
now?: Date;
|
|
17
|
-
defaultTranslationValues?: RichTranslationValues;
|
|
18
|
-
};
|
|
19
|
-
export default IntlContextValue;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IntlContextValue.js","sourceRoot":"","sources":["../../../src/react/IntlContextValue.tsx"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AbstractIntlMessages } from '../core';
|
|
3
|
-
import IntlConfiguration from '../core/IntlConfiguration';
|
|
4
|
-
import { RichTranslationValues } from '../core/TranslationValues';
|
|
5
|
-
declare type IntlProviderProps = IntlConfiguration & {
|
|
6
|
-
/** All components that use the provided hooks should be within this tree. */
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
/** Global default values for translation values and rich text elements.
|
|
9
|
-
* Can be used for consistent usage or styling of rich text elements.
|
|
10
|
-
* Defaults will be overidden by locally provided values. */
|
|
11
|
-
defaultTranslationValues?: RichTranslationValues;
|
|
12
|
-
/** All messages that will be available in your components. */
|
|
13
|
-
messages?: AbstractIntlMessages;
|
|
14
|
-
};
|
|
15
|
-
export default IntlProviderProps;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IntlProviderProps.js","sourceRoot":"","sources":["../../../src/react/IntlProviderProps.tsx"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import IntlProviderProps from './IntlProviderProps';
|
|
2
|
-
/**
|
|
3
|
-
* Enhances the incoming props with defaults.
|
|
4
|
-
*/
|
|
5
|
-
export default function getIntlContextValue<Props extends Omit<IntlProviderProps, 'children'>>({ getMessageFallback, messages, onError, ...rest }: Props): Omit<Props, "onError" | "getMessageFallback" | "messages"> & {
|
|
6
|
-
messages: import("../core/AbstractIntlMessages").default | undefined;
|
|
7
|
-
onError: (error: import("..").IntlError) => void;
|
|
8
|
-
getMessageFallback: (info: {
|
|
9
|
-
error: import("..").IntlError;
|
|
10
|
-
key: string;
|
|
11
|
-
namespace?: string | undefined;
|
|
12
|
-
}) => string;
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlContextValue.js","sourceRoot":"","sources":["../../../src/react/getIntlContextValue.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,yBAAyB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAC3E,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AAGxD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAIzC,EAAC,kBAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,EAAQ;IACvD,MAAM,YAAY,GAAG,OAAO,IAAI,cAAc,CAAC;IAC/C,MAAM,uBAAuB,GAC3B,kBAAkB,IAAI,yBAAyB,CAAC;IAElD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,IAAI,QAAQ,EAAE;YACZ,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;SAC1C;KACF;IAED,OAAO;QACL,GAAG,IAAI;QACP,QAAQ;QACR,OAAO,EAAE,YAAY;QACrB,kBAAkB,EAAE,uBAAuB;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import AbstractIntlMessages from '../core/AbstractIntlMessages';
|
|
2
|
-
import Formats from '../core/Formats';
|
|
3
|
-
import IntlError from '../core/IntlError';
|
|
4
|
-
import {RichTranslationValues} from '../core/TranslationValues';
|
|
5
|
-
|
|
6
|
-
type IntlContextValue = {
|
|
7
|
-
messages?: AbstractIntlMessages;
|
|
8
|
-
locale: string;
|
|
9
|
-
formats?: Partial<Formats>;
|
|
10
|
-
timeZone?: string;
|
|
11
|
-
onError(error: IntlError): void;
|
|
12
|
-
getMessageFallback(info: {
|
|
13
|
-
error: IntlError;
|
|
14
|
-
key: string;
|
|
15
|
-
namespace?: string;
|
|
16
|
-
}): string;
|
|
17
|
-
now?: Date;
|
|
18
|
-
defaultTranslationValues?: RichTranslationValues;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default IntlContextValue;
|