chore(examples): update with-lingui example (#46007)

This PR updates the `with-lingui` example's dependencies and the actual Lingui site URL

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
This commit is contained in:
Andrii Bodnar 2023-02-17 00:15:53 +02:00 committed by GitHub
parent 282c1a0637
commit c55345267e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 14 deletions

View file

@ -13,7 +13,7 @@ description: Next.js has built-in support for internationalized routing and lang
Next.js has built-in support for internationalized ([i18n](https://en.wikipedia.org/wiki/Internationalization_and_localization#Naming)) routing since `v10.0.0`. You can provide a list of locales, the default locale, and domain-specific locales and Next.js will automatically handle the routing.
The i18n routing support is currently meant to complement existing i18n library solutions like [`react-intl`](https://formatjs.io/docs/getting-started/installation), [`react-i18next`](https://react.i18next.com/), [`lingui`](https://lingui.js.org/), [`rosetta`](https://github.com/lukeed/rosetta), [`next-intl`](https://github.com/amannn/next-intl), [`next-translate`](https://github.com/aralroca/next-translate) and others by streamlining the routes and locale parsing.
The i18n routing support is currently meant to complement existing i18n library solutions like [`react-intl`](https://formatjs.io/docs/getting-started/installation), [`react-i18next`](https://react.i18next.com/), [`lingui`](https://lingui.dev/), [`rosetta`](https://github.com/lukeed/rosetta), [`next-intl`](https://github.com/amannn/next-intl), [`next-translate`](https://github.com/aralroca/next-translate) and others by streamlining the routes and locale parsing.
## Getting started

View file

@ -1,6 +1,6 @@
# With Lingui example
This example shows a way to use [lingui.js](https://lingui.js.org) with next.js.
This example shows a way to use [Lingui](https://lingui.dev) with next.js.
It adds a webpack loader for the messages to avoid having to manually compile while developing as well as adds the compile step to the `next build` script for production builds.
@ -32,7 +32,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut
### How to add more translated strings
To add new strings use the [react component](https://lingui.js.org/tutorials/react-patterns.html#common-i18n-patterns-in-react) `<Trans />` and then run `yarn export` to export the messages into `locale/{language}/messages.po`.
To add new strings use the [react component](https://lingui.dev/tutorials/react-patterns) `<Trans />` and then run `yarn export` to export the messages into `locale/{language}/messages.po`.
### How to add another language

View file

@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: pages/two.js:9
#: pages/two.js:8
msgid "Back home"
msgstr "Back home"
@ -21,7 +21,7 @@ msgstr "Back home"
msgid "English"
msgstr "English"
#: pages/index.js:9
#: pages/index.js:8
msgid "Go to page 2"
msgstr "Go to page 2"

View file

@ -13,7 +13,7 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: pages/two.js:9
#: pages/two.js:8
msgid "Back home"
msgstr "Tillbaka hem"
@ -21,7 +21,7 @@ msgstr "Tillbaka hem"
msgid "English"
msgstr "Engelska"
#: pages/index.js:9
#: pages/index.js:8
msgid "Go to page 2"
msgstr "Gå till sida 2"

View file

@ -4,21 +4,21 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"extract": "lingui extract",
"extract": "NODE_ENV=development lingui extract",
"compile": "lingui compile"
},
"dependencies": {
"@lingui/react": "^3.10.2",
"@lingui/react": "^3.17.1",
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@babel/core": "7.14.5",
"@lingui/cli": "^3.10.2",
"@lingui/core": "3.10.2",
"@lingui/loader": "3.10.2",
"@lingui/macro": "^3.10.2",
"@babel/core": "7.20.12",
"@lingui/cli": "^3.17.1",
"@lingui/core": "3.17.1",
"@lingui/loader": "3.17.1",
"@lingui/macro": "^3.17.1",
"babel-plugin-macros": "^3.1.0"
}
}