Skip to content

Commit 9e5f044

Browse files
authored
docs(examples): Updates create react app to use lingui v5 (#2190)
1 parent 6688f72 commit 9e5f044

File tree

5 files changed

+707
-202
lines changed

5 files changed

+707
-202
lines changed

examples/create-react-app/.babelrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": [
3+
"next/babel"
4+
],
5+
"plugins": ["@lingui/babel-plugin-lingui-macro"]
6+
}
7+

examples/create-react-app/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@lingui/core": "^4.1.2",
7-
"@lingui/react": "^4.1.2",
6+
"@lingui/core": "^5.2.0",
7+
"@lingui/react": "^5.2.0",
88
"react": "^18.2.0",
99
"react-dom": "^18.2.0"
1010
},
@@ -32,8 +32,9 @@
3232
]
3333
},
3434
"devDependencies": {
35-
"@lingui/cli": "^4.11.2",
36-
"@lingui/loader": "^4.11.2",
35+
"@lingui/babel-plugin-lingui-macro": "^5.2.0",
36+
"@lingui/cli": "^5.2.0",
37+
"@lingui/loader": "^5.2.0",
3738
"@testing-library/jest-dom": "^5.16.5",
3839
"@testing-library/react": "^14.0.0",
3940
"@testing-library/user-event": "^14.4.3",

examples/create-react-app/src/locales/cs.po

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ msgstr "Příklad formátovače data:"
2323
msgid "Decrement"
2424
msgstr "Úbytek"
2525

26+
#. placeholder {0}: i18n.number(1_000_000, { style: "currency", currency: "EUR" })
2627
#: src/App.tsx:59
2728
msgid "I have a balance of {0}"
2829
msgstr "Mám zůstatek {0}"
@@ -43,6 +44,7 @@ msgstr "Příklad formátovače čísel:"
4344
msgid "Plurals example: "
4445
msgstr "Příklad množného čísla: "
4546

47+
#. placeholder {0}: i18n.date(new Date(), {})
4648
#: src/App.tsx:53
4749
msgid "Today is {0}"
4850
msgstr "Dnes je {0}"

examples/create-react-app/src/locales/en.po

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ msgstr "Date formatter example:"
2525
msgid "Decrement"
2626
msgstr "Decrement"
2727

28+
#. placeholder {0}: i18n.number(1_000_000, { style: "currency", currency: "EUR" })
2829
#: src/App.tsx:59
2930
msgid "I have a balance of {0}"
3031
msgstr "I have a balance of {0}"
@@ -45,6 +46,7 @@ msgstr "Number formatter example:"
4546
msgid "Plurals example: "
4647
msgstr "Plurals example: "
4748

49+
#. placeholder {0}: i18n.date(new Date(), {})
4850
#: src/App.tsx:53
4951
msgid "Today is {0}"
5052
msgstr "Today is {0}"

0 commit comments

Comments
 (0)