js-lingui

๐ŸŒ ๐Ÿ“– A readable, automated, and optimized (3 kb) internationalization for JavaScript

MIT License

Downloads
7.1M
Stars
4.2K
Committers
219

Bot releases are hidden (Show)

js-lingui - v4.0.0

Published by andrii-bodnar over 1 year ago

v4.0.0 (2023-04-26)

Changelog

Features

  • Hash-based message ID + Context (#1440)
  • Custom Formatters
  • Custom Extractors
  • Message Extraction guide, experimental dependency tree crawling
  • Vue.js Extractor
  • macro: support JSX macro inside conditional expressions (#1436)
  • macro: support renamed identifiers in macro (#1463)
  • extractor: (Experimental): Deps extractor (#1469)
  • core (Experimental): add new core API for Node/JS usage without macros (#1564)
  • core: support extracting from all forms of i18n._ / i18n.t calls (#1586)
  • extractor: support TS experimental decorators (#1517)
  • webpack-loader: support JSON catalogs (#1525)
  • formats: extract formats into separate packages (#1536)
  • macro: support tagged templates in defineMessage + short alias (#1495)
  • conf: clarify the order by messageId and support order by message (#1515)
  • extractor: allow i18._(foo.bar) without warning (#1492)
  • core: add i18n.setCatalogAndActivate for easier nextjs integration (#1541)
  • macro: allow passing any expression as custom i18n instance (#1475)
  • extractor: respect sourcemaps (#1459)
  • examples: update examples (nextjs-babel, nextjs-swc, js, create-react-app) (#1550)
  • examples: add vite-react-babel example (#1558)

Fixes and refactoring

  • always honor process.env.LINGUI_CONFIG (#1447)
  • core: use Intl.PluralRules instead of i18n.loadLocaleData (#1486)
  • core: do not ignore empty plural values (#1504)
  • macro: expression only choices / select options (#1523)
  • macro: mark other as required for ChoiceOptions (#1527)
  • react: remove deprecated defaultProps from Trans component (#1494)
  • cli: exclude pseudo locale during sync (#1455)
  • react: do not remount children of I18nProvider (#1501)
  • react: support array of react components in values (#1593)
  • build: migrate to unbuild (#1545)

Breaking Changes

  • extractor/babel: non-fragile babel extractor options (#1367)
  • extractor: don't use intermediate catalogs (#1358)
  • macro: Trans inside Plural has leading whitespace (#1437)
  • react: remove withI18n (#1503)
  • macro: remove arg macro (#1581)
  • delete Snowpack plugin (#1532)

Links

Credits

@thekip @taozhou-glean @vonovak @j4hr3n @bravo-kernel @andrii-bodnar @Martin005 @janicduplessis

js-lingui - v4.0.0-next.8

Published by andrii-bodnar over 1 year ago

v4.0.0-next.8 (2023-04-21)

Changelog

Features

  • extractor: add new package with Vue.js extractor (#1578)

Fixes

  • extractor: fix extracting from random i18n. members (#1602)
  • cli: allow import from ESM context, add tests (#1605)

Links

Credits

@j4hr3n @thekip

js-lingui - v4.0.0-next.7

Published by andrii-bodnar over 1 year ago

v4.0.0-next.7 (2023-04-18)

Changelog

Fixes

  • cli: resolve package.json with relative path (#1597)

Links

Credits

@taozhou-glean

js-lingui - v4.0.0-next.6

Published by andrii-bodnar over 1 year ago

v4.0.0-next.6 (2023-04-14)

Changelog

Features

  • core: support extracting from all forms of i18n._ / i18n.t calls + "Message Extraction" article (#1586)

Fixes and Refactoring

  • macro!: remove arg macro (#1581)
  • cli: produce TS typings for @lingui/cli (#1579)
  • cli/api: update pseudolocale package (#1582, #1585)
  • react: support array of react components in values (#1593)

Links

Credits

@thekip @taozhou-glean

js-lingui - v4.0.0-next.5

Published by andrii-bodnar over 1 year ago

v4.0.0-next.5 (2023-03-31)

Changelog

Features

  • core (Experimental): add new core API for Node/JS usage without macros (#1564)

Fixes and Refactoring

  • trans: align render callback and 'component' prop (#1539)
  • po-formatter: save explicit id flag in comments instead of flags (#1574)
  • core: improve MessageDescriptor typings. id is always present (#1570)
  • build: remove legacy build system (#1555)
  • build: fix @lingui/message-utils package (#1569)
  • require should use cjs instead of mjs (#1576)

Links

Credits

@thekip @j4hr3n @vonovak @taozhou-glean

js-lingui - v4.0.0-next.4

Published by andrii-bodnar over 1 year ago

v4.0.0-next.4 (2023-03-24)

Changelog

Fixes and Refactoring

  • formatters: fix typing inconsistency and add tsd test for each package (#1547)
  • build: migrate to unbuild (#1545)
  • cli/catalog: decouple catalog type from PO message shape (#1549)

Docs

  • examples: update examples (nextjs-babel, nextjs-swc, js, create-react-app) (#1550)
  • examples: add vite-react-babel example (#1558)
  • docs: vite: add missing dependencies and show ts configuration (#1556)
  • docs: improve formats documentation (#1548)
  • docs: fix react pattern docs (#1562)
  • docs: Update lingui import statement in setup-vite.md (#1552)
  • docs: fix small typos in excluding build file docs (#1554)

Links

Credits

@thekip @taozhou-glean @andrii-bodnar @goibon @j4hr3n

js-lingui - v4.0.0-next.3

Published by andrii-bodnar over 1 year ago

v4.0.0-next.3 (2023-03-21)

Changelog

Features

  • formats: extract formats into separate packages, Custom Formatters (#1536)
  • core: add i18n.setCatalogAndActivate for easier nextjs integration (#1541)

New packages

Fixes

  • react: do not remount children of I18nProvider (#1501)

Refactoring

  • cli: make getFormats asynchronous, prepare for ESM (#1533)
  • formatter-po: ability to disable lingui-id, make it false by default (#1540)
  • cli: extend formatters API with source language (#1542)

Links

Thanks

@thekip @vonovak

js-lingui - v4.0.0-next.2

Published by andrii-bodnar over 1 year ago

v4.0.0-next.2 (2023-03-17)

Changelog

Features

  • extractor: experimental Deps extractor (#1469)
  • extractor: support TS experimental decorators (#1517)
  • format: initial support for external formatters (#1511)
  • webpack-loader: support json catalogs. Improve coverage (#1525)
  • vite-plugin: support different extensions for catalogs. Improve coverage (#1526)
  • macro: support tagged templates in defineMessage + short alias (#1495)
  • conf: clarify the order by messageId and support order by message (#1515)
  • conf: change default orderBy to message (#1519)

Breaking Changes

  • delete Snowpack plugin (#1532)
  • react: remove withI18n (#1503)

Fixes

  • extractor: allow i18._(foo.bar) without warning (#1492)
  • core: do not ignore empty plural values (#1504)
  • macro: expression only choices / select options (#1523)
  • macro: mark other as required for ChoiceOptions (#1527)
  • react: remove deprecated defaultProps from Trans component (#1494)

Links

Thanks

@thekip @taozhou-glean @vonovak

js-lingui - v4.0.0-next.1

Published by andrii-bodnar over 1 year ago

v4.0.0-next.1 (2023-03-09)

Changelog

Fixes

  • macro: more precise check for macro with custom i18n (#1488)

Refactoring

  • core: use Intl.PluralRules instead of i18n.loadLocaleData (#1486, docs)
  • update LinguiConfig typings, add tsd test (#1485)

Links


@thekip

js-lingui - v4.0.0-next.0

Published by andrii-bodnar over 1 year ago

v4.0.0-next.0 (2023-03-06)

Changelog

Features

  • Hash-based message ID + Context (#1440)
  • macro: support JSX macro inside conditional expressions (#1436)
  • macro: support renamed identifiers in macro (#1463)
  • extractor: respect sourcemaps (#1459)

Fixes

  • macro: Trans inside Plural has leading whitespace (#1437)
  • macro: allow passing any expression as custom i18n instance (#1475)
  • cli: exclude pseudo locale during sync (#1455)
  • always honor process.env.LINGUI_CONFIG (#1447)

Refactoring

  • extractor/babel: non-fragile babel extractor options (#1367)
  • extractor: don't use intermediate catalogs (#1358)
  • macro: more accurate typings for macro + testing (#1340)
  • macro: pass config directly to macro (#1442)
  • catalog: read template extension from formatter (#1468)
  • catalog: split to separate files, add tests (#1467)
  • conf: split code, generate typings (#1415)
  • conf: delete migrations for deprecated fields (#1439)
  • cli: add TS typings, remove code duplication in po / po-gettext formats (#1430)
  • cli: update commander + remove deprecated commands (#1444)
  • cli: no console.error on informational output (#1429)

Docs

Visit the js-lingui-git-next-lingui.vercel.app to see the relevant docs, including the migration guide from 3.x to 4.x.

Discussion

Visit the related discussion if you have any questions about this release or feedback. We'll highly appreciate it!


@thekip @Martin005 @andrii-bodnar @taozhou-glean @janicduplessis

js-lingui - v3.16.0

Published by andrii-bodnar over 1 year ago

3.16.0 (2023-01-18)

Bug Fixes

  • cli: {locale} and {name} replace only once in catalog path (#1342) (9e2d7d2)
  • cli: catalogsMergePath doesn't merge catalogs (#1341) (12ad0df)
  • Dynamic versioning of internal packages (#1332) (a1ff393)
  • macro: Extraction outputting empty objects (#1331) (261265f)
  • Local development not working on Windows (ad9b735)
  • types: <Trans>can have an i18n props (#1308) (de01f8d)

Features

  • lingui extract should fail with a non-zero exit code when there are extraction failures (#1299) (c863322)
  • allow extract to work with i18n._ calls not created from macro (#1309) (90be171)

Refactoring

  • refactor(macro): make code strongly typed (#1321)
  • refactor(core) bump messageformat parser. Add TS types (#1328)
  • fix(conf) proper typings for LinguiConfig['runtimeConfigModule'] (#1329)
  • refactor(build): typescript + support inner exports (#1336)
  • chore(size-limit): test esm packages and update size-limit dep (#1338)
  • fix(build): fix tree shaking and bundle size (#1343)
js-lingui - v3.2.2

Published by tricoder42 almost 4 years ago

3.2.2 (2020-11-20)

Bug Fixes

  • fallbackLocales overriden if parent found (a53e12f)
  • locale not present in catalogs warn (6f598e8)
  • parse template strings in t and defineMessage macros (#862) (024a7e6)
js-lingui -

Published by tricoder42 almost 4 years ago

Fix broken build

js-lingui -

Published by tricoder42 almost 4 years ago

Bug Fixes

Features

  • accept t as function (c0c08ba)
  • add cli option to extract only a specific locale (#816) (49f45b2)
  • enable pseudolocalization from pseudolocale folder (#836) (f1e0078)
  • lookup lingui command suggestions in package.json (#823) (d58dc09)
  • use fallback locales from cldr (#820) (2d9e124)
js-lingui -

Published by tricoder42 almost 4 years ago

Bug Fixes

  • Handle multiple paths in catalogs.include (#803).
js-lingui -

Published by tricoder42 almost 4 years ago

Bug Fixes

  • Fix catalog include paths on Windows (#802).
  • Fix type of Trans component (#801).
  • Accept React 17 as a peer dependency (#789).
  • Allow null overrides for render and component props (#799). Thanks to Declan Haigh
js-lingui - 3.0.0

Published by tricoder42 almost 4 years ago

js-lingui -

Published by tricoder42 about 4 years ago

Bug Fixes

  • Remove OpenCollective from CLI dependencies
js-lingui -

Published by tricoder42 over 4 years ago

Bug Fixes

js-lingui -

Published by tricoder42 almost 5 years ago

New Features

Bug Fixes