next-intl 2.1.1 → 2.3.1

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.
Files changed (2) hide show
  1. package/README.md +17 -22
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -11,30 +11,20 @@
11
11
 
12
12
  ![Gzipped size](https://badgen.net/bundlephobia/minzip/next-intl) ![Tree shaking supported](https://badgen.net/bundlephobia/tree-shaking/next-intl) [<img src="https://img.shields.io/npm/dw/next-intl.svg" />](https://www.npmjs.com/package/next-intl)
13
13
 
14
- This library complements the [internationalized routing](https://nextjs.org/docs/advanced-features/i18n-routing) capabilities of Next.js by managing translations and providing them to components.
15
-
16
14
  ## Features
17
15
 
18
- - 🌟 Messages use the **proven [ICU syntax](https://formatjs.io/docs/core-concepts/icu-syntax)** which covers interpolation, plurals, ordinal pluralization, label selection based on enums and rich text. I18n is an essential part of the user experience, therefore this library doesn't compromise on flexibility and never leaves you behind when you need to fine tune a translation.
19
- - 📅 Built-in **date, time and number formatting** provides all the necessary parts you need for localisation. You can use global formats for a consistent look & feel of your app and integrate them with translations.
20
- - 💡 A **hooks-only API** ensures that you can use the same API for `children` as well as for attributes which expect strings.
21
- - ⚔️ Based on **battle-tested** building blocks from [Format.JS](https://formatjs.io/) (used by `react-intl`) and modern browser APIs, this library is a thin wrapper around high-quality, lower-level APIs for i18n.
22
- - 🚀 By integrating with both **static as well as server side rendering** you always get the best possible performance from your app.
16
+ This library complements the [internationalized routing](https://nextjs.org/docs/advanced-features/i18n-routing) capabilities of Next.js by managing translations and providing them to components.
17
+
18
+ - 🌟 **Proven [ICU syntax](https://formatjs.io/docs/core-concepts/icu-syntax)**: This covers interpolation, plurals, ordinal pluralization, label selection based on enums and rich text. I18n is an essential part of the user experience, therefore this library doesn't compromise on flexibility and never leaves you behind when you need to fine tune a translation.
19
+ - 📅 **Built-in date, time and number formatting**: You can use global formats for a consistent look & feel of your app and integrate them with translations.
20
+ - 💡 **Hooks-only API**: This ensures that you can use the same API for `children` as well as for attributes which expect strings.
21
+ - ⚔️ **Battle-tested building blocks**: This library is a minimal wrapper around built-in browser APIs and supplemental lower-level APIs from [Format.JS](https://formatjs.io/) (used by `react-intl`).
22
+ - 🚀 **Fast**: By integrating with both static as well as server side rendering you always get the best possible performance from your app.
23
23
 
24
24
  ## What does it look like?
25
25
 
26
26
  This library is based on the premise that messages can be grouped by namespaces (typically a component name).
27
27
 
28
- ```js
29
- // en.json
30
- {
31
- "LatestFollower": {
32
- "latestFollower": "{username} started following you",
33
- "followBack": "Follow back"
34
- }
35
- }
36
- ```
37
-
38
28
  ```jsx
39
29
  // LatestFollower.js
40
30
  function LatestFollower({user}) {
@@ -49,9 +39,14 @@ function LatestFollower({user}) {
49
39
  }
50
40
  ```
51
41
 
52
- ## Docs
42
+ ```js
43
+ // en.json
44
+ {
45
+ "LatestFollower": {
46
+ "latestFollower": "{username} started following you",
47
+ "followBack": "Follow back"
48
+ }
49
+ }
50
+ ```
53
51
 
54
- - [Installation guide](./docs/installation.md)
55
- - [Usage guide](./docs/usage.md)
56
- - [FAQ](./docs/faq.md)
57
- - [Changelog](./CHANGELOG.md)
52
+ ### [ Read the docs](https://next-intl-docs.vercel.app/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-intl",
3
- "version": "2.1.1",
3
+ "version": "2.3.1",
4
4
  "sideEffects": false,
5
5
  "author": "Jan Amann <jan@amann.me>",
6
6
  "description": "A minimal, but complete solution for managing translations, date and number formatting in Next.js apps.",
@@ -37,7 +37,7 @@
37
37
  "next.js"
38
38
  ],
39
39
  "dependencies": {
40
- "use-intl": "^2.1.1"
40
+ "use-intl": "^2.3.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "next": "^10.0.0 || ^11.0.0 || ^12.0.0",
@@ -45,18 +45,18 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@testing-library/react": "^11.1.2",
48
- "@types/react": "^16.9.56",
48
+ "@types/react": "^17.0.33",
49
49
  "eslint": "7.4.0",
50
50
  "eslint-config-molindo": "5.0.1",
51
51
  "next": "^11.0.0",
52
52
  "react": "^17.0.0",
53
53
  "react-dom": "^17.0.0",
54
54
  "tsdx": "^0.14.1",
55
- "tslib": "^2.0.3",
56
- "typescript": "^4.1.2"
55
+ "tslib": "^2.3.1",
56
+ "typescript": "^4.4.4"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=10"
60
60
  },
61
- "gitHead": "a16802171af11d02cfcca7c0c7a6b0b7195bc105"
61
+ "gitHead": "3e080f29f06ba501597158c94905b70dbfc7476f"
62
62
  }