Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync next to main #1871

Draft
wants to merge 49 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
916732f
feat(macro): add useLingui macro (#1859)
timofei-iatsenko Mar 1, 2024
8b1d0a3
chore(release): published v4.8.0-next.0 [skip ci]
lingui-bot Mar 4, 2024
01405f8
refactor(macro): macro to plugin (#1867)
timofei-iatsenko Mar 6, 2024
1204a0f
docs(examples): update examples with useLingui macro (#1875)
timofei-iatsenko Mar 6, 2024
1d29a95
chore(release): published v4.8.0-next.1 [skip ci]
lingui-bot Mar 6, 2024
10e6119
feat(cli): support multiple locales in extract command (#1858)
dan-dr Mar 6, 2024
08032b8
fix(macro): fix failure when macro meets function carrying (#1884)
timofei-iatsenko Mar 11, 2024
798ca5b
docs: fix broken anchor
andrii-bodnar Mar 11, 2024
30b5940
refactor(macro): split js and react macro into two packages (#1883)
timofei-iatsenko Mar 15, 2024
2071e0f
refactor(macro): robust whitespace handling according to jsx spec (#1…
timofei-iatsenko Mar 26, 2024
b031df7
Merge branch 'main' into next
andrii-bodnar Mar 26, 2024
13f9ccb
refactor(macro): explicitly mark symbols as deprecated (#1898)
timofei-iatsenko Apr 3, 2024
1f18e68
refactor(macro): remove whitespace cleaning from js macro (#1897)
timofei-iatsenko Apr 4, 2024
4c494ad
chore: remove the deprecated 'isTranslated' property (#1907)
andrii-bodnar Apr 5, 2024
6bb8983
fix(react): process falsy values with JSX semantics (#1906)
timofei-iatsenko Apr 5, 2024
afc962c
chore(macro): snapshot testing (#1912)
timofei-iatsenko Apr 12, 2024
592889a
fix: escaped curly-braces doesn't preserve in development mode (#1913)
ninesunsabiu Apr 30, 2024
4821317
refactor(macro): use message descriptor for Trans (#1909)
timofei-iatsenko May 21, 2024
46ac32f
feat(react): fix macro export conditions for NodeNext and Bundler res…
timofei-iatsenko Jun 17, 2024
8b35acf
fix(experimental-extractor): fix various bugs (#1958)
timofei-iatsenko Jun 18, 2024
6230100
feat: collect and print placeholders in Po files for better translati…
timofei-iatsenko Jun 28, 2024
d5c75e1
Merge branch 'main' into next
andrii-bodnar Jul 4, 2024
d772658
fix: fixes after merging main into next
andrii-bodnar Jul 4, 2024
ed32b7c
fix: fixes after mergin main into next (2)
andrii-bodnar Jul 4, 2024
db1d812
docs: initial draft of the Lingui v5 migration guide (#1968)
andrii-bodnar Jul 5, 2024
2192f8d
chore(release): published v5.0.0-next.0
andrii-bodnar Jul 5, 2024
937234f
fix(experimental-extractor): change default loader to tsx (#1971)
timofei-iatsenko Jul 12, 2024
9ad4779
fix(extractor): fix warning when `key` used on macros (#1990)
timofei-iatsenko Aug 7, 2024
83c162f
chore: update glob to v11 (#1994)
timofei-iatsenko Aug 9, 2024
894759c
fix: windows incompatibilities (#1996)
timofei-iatsenko Aug 14, 2024
ae82906
docs: update for v5 (#1992)
timofei-iatsenko Aug 22, 2024
b4ffe7f
feat: allow to use useLingui with only i18n (#2006)
timofei-iatsenko Sep 6, 2024
517eff1
Merge branch 'main' into next
andrii-bodnar Sep 6, 2024
7936155
chore(release): published v5.0.0-next.1
andrii-bodnar Sep 6, 2024
42ecca5
chore: set the minimum required node version to 20 (#2037)
andrii-bodnar Sep 23, 2024
a9d2cb5
Merge branch 'main' into next
andrii-bodnar Sep 23, 2024
927c319
refactor(macro) split and expose internals to be used in Vue macro (#…
timofei-iatsenko Sep 23, 2024
baec0ab
feat: add setMessagesCompiler method (#2035)
timofei-iatsenko Oct 14, 2024
fd17843
Merge branch 'main' into next
andrii-bodnar Oct 15, 2024
2df220a
docs: migration guide improvements
andrii-bodnar Oct 15, 2024
71fa9b0
chore(release): published v5.0.0-next.2
andrii-bodnar Oct 15, 2024
aaf079a
fix(macro): show codeframe of error in webpack (#2049)
timofei-iatsenko Oct 16, 2024
ca458bc
fix: correctly handle a variable passed to the `t` macro (#2048)
timofei-iatsenko Oct 16, 2024
c027f0e
chore(release): published v5.0.0-next.3
andrii-bodnar Oct 16, 2024
2313f3d
feat: remove deprecated extractBabelOptions (#2051)
timofei-iatsenko Oct 17, 2024
a445119
refactor: remove strings support from `LinguiConfig.extractors` (#2052)
timofei-iatsenko Oct 17, 2024
c9ef102
docs: update examples for v5 (#2053)
timofei-iatsenko Oct 17, 2024
3e1eac8
Merge branch 'main' into next
andrii-bodnar Oct 17, 2024
3a51350
docs: @lingui/macro article refinement (#2055)
andrii-bodnar Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["16", "18", "19", "20"]
node: ["20", "22"]
os: [ubuntu-latest, windows-latest]

steps:
Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
[![Join the community on Discord][Badge-Discord]][Discord]

[**Documentation**][Documentation] · [**Quickstart**](#quickstart) · [**Example**](#example) · [**Support**](#support) · [**Contribute**](#contribute) · [**License**](#license)

</div>

> Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.
>
> --- [ W3C Web Internationalization FAQ](https://www.w3.org/International/questions/qa-i18n)


Lingui is an easy yet powerful internationalization framework for global projects.

- **Clean and readable** - Keep your code clean and readable, while the library uses
Expand Down Expand Up @@ -76,14 +76,14 @@ If you're a react-intl user, check out [a comparison of react-intl and Lingui](h
Short example how i18n looks with JSX:

```js
import { Trans } from "@lingui/macro"
import { Trans } from "@lingui/react/macro"

function App() {
return (
<Trans id="msg.docs" /* id is optional */>
Read the <a href="https://lingui.dev">documentation</a>
for more info.
</Trans>
<Trans id="msg.docs" /* id is optional */>
Read the <a href="https://lingui.dev">documentation</a>
for more info.
</Trans>
)
}
```
Expand Down Expand Up @@ -131,18 +131,15 @@ The project is licensed under the [MIT][License] license.
[SetupVite]: https://lingui.dev/tutorials/setup-vite
[RefCLI]: https://lingui.dev/ref/cli
[Examples]: https:/lingui/js-lingui/tree/main/examples

[SWCPlugin]: https://lingui.dev/ref/swc-plugin
[VitePlugin]: https://lingui.dev/ref/vite-plugin
[ESLintPlugin]: https://lingui.dev/ref/eslint-plugin

[Badge-MainSuite-GithubCI]: https:/lingui/js-lingui/workflows/main-suite/badge.svg
[Badge-ReleaseWorkflowTesting-GithubCI]: https:/lingui/js-lingui/workflows/release-workflow-test/badge.svg
[Badge-Coverage]: https://img.shields.io/codecov/c/github/lingui/js-lingui/main.svg
[Badge-PRWelcome]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[Badge-Discord]: https://img.shields.io/discord/974702239358783608.svg?label=Discord&logo=Discord&colorB=7289da&style=flat-square
[Contributors]: https:/lingui/js-lingui/graphs/contributors

[Coverage]: https://codecov.io/gh/lingui/js-lingui
[License]: https:/lingui/js-lingui/blob/main/LICENSE
[Contributing]: https:/lingui/js-lingui/blob/main/CONTRIBUTING.md
Expand Down
5 changes: 2 additions & 3 deletions examples/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
]
},
"devDependencies": {
"@lingui/cli": "^4.1.2",
"@lingui/loader": "^4.1.2",
"@lingui/macro": "^4.1.2",
"@lingui/cli": "^4.11.2",
"@lingui/loader": "^4.11.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
Expand Down
5 changes: 2 additions & 3 deletions examples/create-react-app/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ import React from "react"
import { getByText, render, act } from "@testing-library/react"
import { i18n } from "@lingui/core"
import { I18nProvider } from "@lingui/react"

import App from "./App"

i18n.load({
en: {
ZXBDaP: "Language switcher example:",
"zg/nOF": "Language switcher example: ",
},
cs: {
ZXBDaP: "Příklad přepínače jazyků:",
"zg/nOF": "Příklad přepínače jazyků: ",
},
})

Expand Down
2 changes: 1 addition & 1 deletion examples/create-react-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./App.css"
import React, { useState } from "react"
import { Trans, Plural } from "@lingui/macro"
import { Trans, Plural } from "@lingui/react/macro"

import { locales, dynamicActivate } from "./i18n"
import { useLingui } from "@lingui/react"
Expand Down
26 changes: 13 additions & 13 deletions examples/create-react-app/src/locales/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#: src/App.tsx:31
#: src/App.tsx:43
msgid "{count, plural, zero {There are no books} one {There's one book} other {There are # books}}"
msgstr "{count, plural, zero {Nejsou žádné knihy} one {Je tu jedna kniha} other {Existuje # knih}}"

#: src/App.tsx:37
#: src/App.tsx:50
msgid "Date formatter example:"
msgstr "Příklad formátovače data:"

#: src/App.tsx:28
#: src/App.tsx:40
msgid "Decrement"
msgstr "Úbytek"

#: src/App.tsx:45
#: src/App.tsx:59
msgid "I have a balance of {0}"
msgstr "Mám zůstatek {0}"

#: src/App.tsx:25
#: src/App.tsx:37
msgid "Increment"
msgstr "Přírůstek"

#: src/App.tsx:14
msgid "Language switcher example:"
msgstr "Příklad přepínače jazyků:"
#: src/App.tsx:19
msgid "Language switcher example: "
msgstr "Příklad přepínače jazyků: "

#: src/App.tsx:43
#: src/App.tsx:56
msgid "Number formatter example:"
msgstr "Příklad formátovače čísel:"

#: src/App.tsx:22
msgid "Plurals example:"
msgstr "Příklad množného čísla:"
#: src/App.tsx:33
msgid "Plurals example: "
msgstr "Příklad množného čísla: "

#: src/App.tsx:39
#: src/App.tsx:53
msgid "Today is {0}"
msgstr "Dnes je {0}"
26 changes: 13 additions & 13 deletions examples/create-react-app/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,38 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"

#: src/App.tsx:31
#: src/App.tsx:43
msgid "{count, plural, zero {There are no books} one {There's one book} other {There are # books}}"
msgstr "{count, plural, zero {There are no books} one {There's one book} other {There are # books}}"

#: src/App.tsx:37
#: src/App.tsx:50
msgid "Date formatter example:"
msgstr "Date formatter example:"

#: src/App.tsx:28
#: src/App.tsx:40
msgid "Decrement"
msgstr "Decrement"

#: src/App.tsx:45
#: src/App.tsx:59
msgid "I have a balance of {0}"
msgstr "I have a balance of {0}"

#: src/App.tsx:25
#: src/App.tsx:37
msgid "Increment"
msgstr "Increment"

#: src/App.tsx:14
msgid "Language switcher example:"
msgstr "Language switcher example:"
#: src/App.tsx:19
msgid "Language switcher example: "
msgstr "Language switcher example: "

#: src/App.tsx:43
#: src/App.tsx:56
msgid "Number formatter example:"
msgstr "Number formatter example:"

#: src/App.tsx:22
msgid "Plurals example:"
msgstr "Plurals example:"
#: src/App.tsx:33
msgid "Plurals example: "
msgstr "Plurals example: "

#: src/App.tsx:39
#: src/App.tsx:53
msgid "Today is {0}"
msgstr "Today is {0}"
Loading
Loading