Skip to content

Commit

Permalink
refactor(macro): split js and react macro into two packages (#1883)
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko authored Mar 15, 2024
1 parent ead1a61 commit b6e0656
Show file tree
Hide file tree
Showing 122 changed files with 1,683 additions and 1,179 deletions.
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://github.com/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://github.com/lingui/js-lingui/workflows/main-suite/badge.svg
[Badge-ReleaseWorkflowTesting-GithubCI]: https://github.com/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://github.com/lingui/js-lingui/graphs/contributors

[Coverage]: https://codecov.io/gh/lingui/js-lingui
[License]: https://github.com/lingui/js-lingui/blob/main/LICENSE
[Contributing]: https://github.com/lingui/js-lingui/blob/main/CONTRIBUTING.md
Expand Down
1 change: 0 additions & 1 deletion examples/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"devDependencies": {
"@lingui/cli": "^4.8.0-next.0",
"@lingui/loader": "^4.8.0-next.0",
"@lingui/macro": "^4.8.0-next.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
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
Loading

0 comments on commit b6e0656

Please sign in to comment.