@lingui/core 5.0.0-next.2 → 5.0.0-next.4

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
@@ -8,14 +8,7 @@
8
8
 
9
9
  `@lingui/core` is part of [LinguiJS][linguijs]. See the [documentation][documentation] for all information, tutorials and examples.
10
10
 
11
- ## Installation
12
-
13
- ```sh
14
- npm install --save @lingui/core
15
- # yarn add @lingui/core
16
- ```
17
-
18
- ## Usage
11
+ ## Installation & Usage
19
12
 
20
13
  See the [tutorial][tutorial] or [reference][reference] documentation.
21
14
 
package/macro/index.d.ts CHANGED
@@ -78,7 +78,7 @@ export function t(
78
78
  * import { I18n } from "@lingui/core";
79
79
  * const i18n = new I18n({
80
80
  * locale: "nl",
81
- * messages: { "Hello {0}": "Hallo {0}" },
81
+ * messages: { "Hello {name}": "Hallo {name}" },
82
82
  * });
83
83
  * const message = t(i18n)`Hello ${name}`;
84
84
  * ```
@@ -89,10 +89,14 @@ export function t(
89
89
  * import { I18n } from "@lingui/core";
90
90
  * const i18n = new I18n({
91
91
  * locale: "nl",
92
- * messages: { "Hello {0}": "Hallo {0}" },
92
+ * messages: { "Hello {name}": "Hallo {name}" },
93
93
  * });
94
94
  * const message = t(i18n)({ message: `Hello ${name}` });
95
95
  * ```
96
+ *
97
+ * @deprecated in v5, would be removed in v6.
98
+ * Please use `` i18n._(msg`Hello ${name}`) `` instead
99
+ *
96
100
  */
97
101
  export function t(i18n: I18n): {
98
102
  (literals: TemplateStringsArray, ...placeholders: any[]): string
@@ -209,6 +213,6 @@ export function defineMessage(
209
213
 
210
214
  /**
211
215
  * Define a message for later use
212
- * Alias for {@see defineMessage}
216
+ * Alias for {@link defineMessage}
213
217
  */
214
218
  export const msg: typeof defineMessage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/core",
3
- "version": "5.0.0-next.2",
3
+ "version": "5.0.0-next.4",
4
4
  "sideEffects": false,
5
5
  "description": "I18n tools for javascript",
6
6
  "main": "./dist/index.cjs",
@@ -60,7 +60,7 @@
60
60
  ],
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.20.13",
63
- "@lingui/message-utils": "^5.0.0-next.2",
63
+ "@lingui/message-utils": "^5.0.0-next.4",
64
64
  "unraw": "^3.0.0"
65
65
  },
66
66
  "devDependencies": {
@@ -69,7 +69,7 @@
69
69
  "unbuild": "2.0.0"
70
70
  },
71
71
  "peerDependencies": {
72
- "@lingui/babel-plugin-lingui-macro": "5.0.0-next.2",
72
+ "@lingui/babel-plugin-lingui-macro": "5.0.0-next.4",
73
73
  "babel-plugin-macros": "2 || 3"
74
74
  },
75
75
  "peerDependenciesMeta": {
@@ -80,5 +80,5 @@
80
80
  "optional": true
81
81
  }
82
82
  },
83
- "gitHead": "71fa9b0b55deded4b30a25f9bda2a28a7cf4ec12"
83
+ "gitHead": "7b9ca5b479be4acd58ed95bff841e89efba06279"
84
84
  }