@lingui/macro 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 +3 -24
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -5,35 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
# @lingui/macro
|
|
7
7
|
|
|
8
|
-
> [Babel Macros](https://github.com/kentcdodds/babel-plugin-macros) which
|
|
9
|
-
> transforms tagged template literals and JSX components to ICU MessageFormat.
|
|
8
|
+
> [Babel Macros](https://github.com/kentcdodds/babel-plugin-macros) which transforms tagged template literals and JSX components to ICU MessageFormat.
|
|
10
9
|
|
|
11
|
-
`@lingui/macro` is part of [LinguiJS][linguijs]. See the [documentation][documentation]
|
|
12
|
-
for all information, tutorials and examples.
|
|
10
|
+
`@lingui/macro` is part of [LinguiJS][linguijs]. See the [documentation][documentation] for all information, tutorials and examples.
|
|
13
11
|
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
npm install --save-dev @lingui/macro
|
|
18
|
-
# yarn add --dev @lingui/macro
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
12
|
+
## Installation & Usage
|
|
22
13
|
|
|
23
14
|
See the [reference][reference] documentation.
|
|
24
15
|
|
|
25
|
-
```jsx
|
|
26
|
-
import { setupI18n } from "@lingui/core"
|
|
27
|
-
import { t } from "@lingui/core/macro"
|
|
28
|
-
|
|
29
|
-
const i18n = setupI18n()
|
|
30
|
-
|
|
31
|
-
const message = i18n._(t`Hello, my name is ${name} and today is ${date(now)}`)
|
|
32
|
-
|
|
33
|
-
// line above is transformed using babel-plugin-macros to this
|
|
34
|
-
// const message = i18n._(/*i18n*/{ id: "Hello, my name is {name} and today is {now,date}", values: { name, now }})
|
|
35
|
-
```
|
|
36
|
-
|
|
37
16
|
## License
|
|
38
17
|
|
|
39
18
|
[MIT][license]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/macro",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.4",
|
|
4
4
|
"description": "Macro for generating messages in ICU MessageFormat syntax",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"index.js"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@lingui/core": "^5.0.0-next.
|
|
51
|
-
"@lingui/react": "^5.0.0-next.
|
|
50
|
+
"@lingui/core": "^5.0.0-next.4",
|
|
51
|
+
"@lingui/react": "^5.0.0-next.4"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@lingui/babel-plugin-lingui-macro": "4.11.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"optional": true
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "7b9ca5b479be4acd58ed95bff841e89efba06279"
|
|
66
66
|
}
|