Skip to content

Latest commit

 

History

History
1052 lines (658 loc) · 72.4 KB

CHANGELOG.md

File metadata and controls

1052 lines (658 loc) · 72.4 KB

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.0.0 (2024-11-28)

We are pleased to announce the release of Lingui 5.0! This release is a major milestone for the project and includes a number of new features, improvements and bug fixes.

Check out the links below for more details:

4.14.1 (2024-11-28)

Bug Fixes

  • don't report statistics for pseudo locale (#2094) (113c05d)

4.14.0 (2024-11-07)

Bug Fixes

  • extract: when files are used, don't overwrite obsolete (#1964) (e726b16)

Features

  • format-po-gettext: respect Plural-Forms header (#2070) (5d0516e)

4.13.0 (2024-10-15)

Features

  • adds custom prefix support for gettext po (#2004) (25b3bc6)

4.12.0 (2024-10-11)

Bug Fixes

Features

  • add metro transformer (#1999) (cc7fe27)
  • enable importAttributes and explicitResourceManagement for extractor (#2009) (c20ce12)

4.11.4 (2024-09-02)

Bug Fixes

4.11.3 (2024-08-09)

Bug Fixes

  • cli: add pnpm detection to command suggestions (#1989) (287a688)
  • extract: escape special regex characters used in file-based routing systems when files are passed in options (#1984) (fd92d20)

4.11.2 (2024-07-03)

Bug Fixes

  • cli: update translationIO service in CLI package (to handle context) (#1949) (ea7b9e7)
  • include type cast on ts compilation (#1962) (0f66617)

4.11.1 (2024-05-30)

Bug Fixes

  • (lingui/core) i18n error if id is undefined (#1938) (36c637a)

4.11.0 (2024-05-17)

Bug Fixes

  • default message extraction (#1936) (8f1ddd7)
  • exclude .scss files from extract-experimental build (#1935) (d01fa96)
  • message-utils: correctly handle multi-digit complex argument cases (#1937) (47a0dde)

Features

  • format-po: configure header attributes in PO file formatter (#1934) (d90f778)

4.10.1 (2024-05-03)

Bug Fixes

  • core: pound symbol being replaced outside plural and selectordinal (#1928) (e94c6fd)

4.10.0 (2024-04-12)

Features

4.9.0 (2024-04-12)

Features

4.8.0 (2024-04-03)

Features

  • react: add "use client" for react bundle (#1902) (5cf50ff)

4.7.2 (2024-03-26)

Bug Fixes

  • allow parentheses in catalog pathnames (#1890) (d6b9698)
  • typo: Correct typo in build script of nextjs-swc example (#1885) (7473bc4)

4.7.1 (2024-02-20)

Bug Fixes

  • compile should generate a TS file (#1851) (e4fbd59)
  • core: use named instead of default export for unraw lib (#1837) (85f0944)
  • don't replace octothorpe coming from variable (#1850) (e321729)

4.7.0 (2024-01-05)

Bug Fixes

Features

4.6.0 (2023-12-01)

Bug Fixes

  • cli: import type as type (#1802) (960aadb)
  • cli: sorting issue when different locales are used on host machines (#1808) (4b8b2a7)
  • experimental-extractor: fix ERR_IMPORT_ASSERTION_TYPE_MISSING issue (#1775) (efcd405)

Features

  • format-json: ability to set indentation (#1807) (6ee7e63)
  • message-utils: make generateMessageId to be working in browser (#1776) (f879ddb)

Reverts

  • Revert "docs: add the ESLint plugin announcement (#1759)" (#1774) (e7a36d1), closes #1759 #1774

4.5.0 (2023-09-14)

Features

4.4.2 (2023-08-31)

Reverts

  • Revert "refactor: use useSyncExternalStore to subscribe for context updates (#1746)" (#1755) (4164893), closes #1746 #1755

4.4.1 (2023-08-30)

Bug Fixes

Features

4.4.0 (2023-08-08)

Bug Fixes

  • webpack-loader: fix invalid dependencies have been reported by p… (#1735) (1521ae7)

Features

4.3.0 (2023-06-29)

Bug Fixes

  • format-po-gettext: bad return during mapping with serializePlurals (#1707) (993bd2a)

Features

  • allow comment prop on react Trans component (#1718) (3477c32)
  • extractor: expose extractFromFileWithBabel function for better flexibility (#1719) (43486dc)
  • vite-plugin: report user-friendly error when macro used without transformation (#1720) (53f6a7c)

4.2.1 (2023-06-07)

Bug Fixes

  • core: don't crash on escaped unicode symbols in messages (#1692) (461c2fc)
  • extractor: support jsx in js files (#1678) (e335458)

4.2.0 (2023-05-26)

Bug Fixes

  • fallback to other only when undefined (#1665) (a79de75)
  • webpack + vite: fix dependency watching in loader (#1671) (f06cdf5)

Features

  • po-format: add explicitIdAsDefault for po-format for easier migration (#1672) (3303228)

4.1.2 (2023-05-17)

Bug Fixes

  • webpack + vite: fix dependency watching in loader (#1662) (ce660d7)

4.1.1 (2023-05-17)

Bug Fixes

  • message-utils: workaround package.json exports field for older runtimes (#1657) (e3ff138)

4.1.0 (2023-05-15)

Bug Fixes

  • format should follow locale order (#1619) (4d53b7b)
  • just use require to import services (#1647) (388c77b)
  • message-utils: workaround package.json exports field (#1650) (3bee00c)
  • react macro types (#1620) (8a48b9f)
  • vue-extractor: don't crash when there is no in an SFC (#1623) (9e6ea70)
  • vue-extractor: fix default export burden with /api/extractors/babel (#1626) (045eb21)
  • Features

    4.0.0 (2023-04-xx)

    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: add new package with vue extractor (#1578)
    • 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

    3.17.2 (2023-02-24)

    Bug Fixes

    3.17.1 (2023-02-07)

    Bug Fixes

    • compile: remove verbose output when using flow with template (#1388) (31316f9)
    • conf: lazy load cosmiconfig's TypeScriptLoader (#1403) (617a333)
    • Named components not working in Trans in @lingui/react (#1402) (bf7f655)
    • build: undeclared dependencies (#1391) (f390ca4)

    3.17.0 (2023-02-01)

    Bug Fixes

    • conf: proper typescript cosmiconfig loader (#1386) (8da122d)
    • macro: JS macros don't strip non-essential props in production (#1389) (0ff55d6)

    Features

    • implement @lingui/vite-plugin (#1306) (db5d3c3)
    • macro: throw useful error message if macro used without a plugin (#1355) (7d55904)

    3.16.1 (2023-01-24)

    Bug Fixes

    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)

    3.15.0 (2022-11-07)

    Bug Fixes

    • add null undefined check (016ff0e)
    • allow lingui compile to compile without plural (#1280) (be265ef)
    • extract-template async race issue (#1279) (a69ed8f)
    • Make pseudolocal use the message AST instead of the key (#1293) (7c85cb7)
    • Pass formatter to pluralization function (#1294) (33af3ba)
    • remove Node v10, add node v16, fix the fsPromises error (9739e4f)
    • Try to add a trailing newline if the file had one (#1260) (da25b94)
    • use the 3.9 Python version in the 'deploy-docs' workflow (83d76f3)

    Features

    • Reduce @lingui/macro CPU and memory usage (#1298) (c993d9e)
    • Support GetText template files support during compile (#1296) (5e43810)
    • Switch to cosmiconfig-typescript-loader #1247 (118d183)

    3.14.0 (2022-06-22)

    Bug Fixes

    • Add extra package.json under /esm (#1258) (80cd337)
    • Fix error read properties of undefined (#1239) (8dd2398)
    • JSX attribute parsing issue when using html entities (#1234) (98e9332)

    Features

    • Pass props to I18nProvider.defaultComponent in Trans.render style (#1242) (fe4cac4)

    3.13.3 (2022-04-24)

    Bug Fixes

    • @lingui/react compatible with React 18 (2a235ba)
    • JSX attribute parsing issue when using double quotes (#1226) (27a7ded)
    • specify children for react v18 types (#1230) (ee69736)

    3.13.2 (2022-01-24)

    Bug Fixes

    • localeData interpolation broken (457735b)

    3.13.1 (2022-01-21)

    Bug Fixes

    • add lingui core to macro peer dependencies (#1187) (daaa773)
    • cloud service import() on case-sensitive filesystems (#1174) (5feb120)
    • i18n.activate should load instantly new messages (#1182) (f8f47a2)
    • remove the obsolete defineMessages function from the typings. (#1179) (19b032f)

    3.13.0 (2021-11-26)

    Bug Fixes

    • pin cli-table to 0.3.6 (#1172) (b659b18)
    • cli: extract with --overwrite should fallback to key (#1166) (e5e9d59)
    • Allow pseudoLocalize to work in @lingui/loader (#1165) (356c224)
    • don't push pseudoLocale to translation.io provider (#1161) (5d2186b)
    • stripping origin if line numbers already strippped (#1143) (82a3265)

    Features

    3.12.1 (2021-09-28)

    Bug Fixes

    • types: correct types for macro with custom i18n instance (#1141) (a9bffdd)

    3.12.0 (2021-09-28)

    Bug Fixes

    • #1137: configPath is passed through babel-plugin-extract-messages (#1140) (8921156), closes #1137
    • Add missing babel properties to config validation (#1135) (6b2d662)

    Features

    • macro: Add support for passing custom i18n instance (#1139) (5cad96f)

    3.11.1 (2021-09-07)

    Bug Fixes

    3.11.0 (2021-09-07)

    Bug Fixes

    • 'compile --watch' not watching for correct file based on format (#1088) (ab68c06)
    • add extract-template for po-gettext format (#1089) (ea00f55)
    • country-coded language breaks plurals with po-gettext (#1131) (6b60b8a)
    • extractors CLI validation and accept require and require.resolve (#1126) (c50a06e)
    • fallbackLocales to false causing unexpected behaviour (#1123) (60e3952)
    • fix testing suite #1098 (1144cc7)
    • keys with leading number was generating bad object keys (#1127) (8bb2983)
    • no files being found when catalogs.include has more than one entry (#1108) (04efd85)
    • sideEffects to false for shrinking bundle size (#1129) (57cd2e5)
    • unicode chars were removed from .po files when extracting (#1125) (d688329)
    • wrong detect whether a translation is plural (#1119) (48b6644)

    Features

    • Add debounce option to compile and extract CLI (#1101) (a13334c)
    • Cloud service providers & Translation.io (#1107) (cbc87b5)

    3.10.4 (2021-06-16)

    Bug Fixes

    • remoteLoader parse complex structures failed #1087 (cee63c4)

    3.10.3 (2021-06-14)

    Bug Fixes

    3.10.2 (2021-06-08)

    Bug Fixes

    • remoteLoader should return an object instead of export (d461695)

    3.10.1 (2021-06-08)

    Bug Fixes

    3.10.0 (2021-06-08)

    Bug Fixes

    Features

    • load remote catalogs with remoteLoader() (#1080) (e73a4b3)

    3.9.0 (2021-05-18)

    Bug Fixes

    • ESM dev entrypoint was causing unexpected behaviors (#1059) (2b8d70b)
    • lineNumbers false was removing the entire origin (#1060) (2d25f2c)

    Features

    • configurable and extendable extractors with Lingui config (#1065) (263ee59)

    3.8.10 (2021-04-19)

    Bug Fixes

    3.8.9 (2021-04-09)

    Bug Fixes

    3.8.8 (2021-04-09)

    Bug Fixes

    • unicode char was not extracting correctly (3653f6f)

    3.8.7 (2021-04-09)

    Bug Fixes

    • unicode chars in native environments + event emitter refactor (#1036) (39fa90d)

    3.8.6 (2021-04-08)

    Bug Fixes

    • unicode chars were extracting with double slashes (#1035) (aed49b1)

    3.8.5 (2021-04-08)

    Bug Fixes

    • improve compile log error if bad syntax on the string (9b2705f)

    3.8.4 (2021-04-08)

    Bug Fixes

    3.8.3 (2021-04-05)

    Bug Fixes

    3.8.2 (2021-03-31)

    Note: Version bump only for package js-lingui-workspaces

    3.8.1 (2021-03-23)

    Bug Fixes

    • fallback locales default not overwritten (78e4576)

    3.8.0 (2021-03-23)

    Bug Fixes

    • selectOrdinal pseudolocalize insensitive (16acafe)

    Features

    3.7.2 (2021-03-14)

    Bug Fixes

    • lingui extract ignores custom directories as args #998 (f426881)
    • webpack 5 issue with jest @lingui/loader #999 (9e68a8d)

    3.7.1 (2021-03-07)

    Bug Fixes

    • exports attribute on package.json, expo compat (#997) (79aa509)

    3.7.0 (2021-03-04)

    Bug Fixes

    • @lingui/cli type error when catalog is missing (#988) (8c44af2)
    • macro components should omit key prop #994 (f2a4da0)
    • Report correct number of missing messages in strict mode (#992) (128f3e2)
    • use pkgUp.sync to localize package.json (#985) (18d985d)

    Features

    3.6.0 (2021-02-23)

    Features

    3.5.1 (2021-02-09)

    Bug Fixes

    • @lingui/macro types for global environments (#973) (92a5ce7)
    • runtimeConfigModule config validation (#972) (5656c95)
    • @lingui/loader: accept webpack 5.x as a peer dependency (#971) (b9683cc)

    3.5.0 (2021-02-02)

    Bug Fixes

    Features

    3.4.0 (2021-01-13)

    Bug Fixes

    • added return type to i18n._ (#922) (249c486)
    • compilerBabelOptions warning with jest-validate (#938) (087ec1f)
    • Last scaped brackets were not unscaped (db2f768)
    • Use LINGUI_CONFIG env as fallback for extract (#932) (ce71a8b)
    • detect-locale: ESM import not published (#926) (4ad90d4)
    • prevent adding undefined msgid to messages (#915) (3afacec)

    Features

    • Lingui compiles to typescript files (#942) (10bce7d)
    • Support lingui config in multiple formats (#941) (8631111)

    3.3.0 (2020-12-08)

    Bug Fixes

    Features

    • add support for runtimeConfigModule w/ Trans (#895) (23b06b5)
    • config accepts compilerBabelOptions (#906) (38d01ef)
    • extract messages from specific files (#881) (82dea5f)
    • Implement gettext plurals for PO files (#677) (415b90e)

    3.2.3 (2020-11-22)

    Bug Fixes

    • export TransRenderProps from @lingui/react (#877) (3db9d6b)
    • omit i18n prop in withI18n typescript interface (#879) (5927d42)

    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)

    3.2.0 (2020-11-12)

    Bug Fixes

    Features

    • extract multiple comments per translation ID (#854) (c849c9c)

    3.1.0 (2020-11-10)

    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)

    Reverts

    • Revert "chore: improved commit-lint" (75fcf65)

    Change Log

    3.0.3 (2020-11-01)

    Bug Fixes

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

    3.0.2 (2020-11-01)

    Bug Fixes

    • Minor fixes in @lingui/macro and @lingui/react types

    3.0.1 (2020-11-01)

    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

    3.0.0 (2020-11-01)

    See migration guide for a full changelog.

    2.9.1 (2020-01-18)

    Bug Fixes

    2.9.0 (2019-12-02)

    New Features

    Bug Fixes

    2.8.3 (2019-05-22)

    Bug Fixes

    • Loader: Fix type error when no loader config is provided
    • Macro: babel-plugin-macros are peer dependency and must be installed manually

    2.8.2 (2019-05-22)

    Bug Fixes

    • CLI: Don't warn about conflicting default message if it's empty (#502). Thanks to Filip Žmuk.
    • Conf: Pass config path to getConfig explicitly instead reading it from process.argv (#509). Thanks to Brandon Croft.

    2.8.0 (2019-05-17)

    New Features

    • Conf: Allow loading specific configuration file using --config argument (#501). Thanks to Brandon Croft.

    Bug Fixes

    2.7.4 (2019-02-19)

    Bug Fixes

    2.7.3 (2019-01-28)

    • Export @lingui/core/dev subpackage.

    Bug Fixes

    • CLI: Log original info with Babel compatibility info (#401). Thanks to Sam Gluck.
    • CLI: Allow pseudolocales which don't start with a known language (#411). Thanks to Eric Plumb.
    • CLI: Made pseudolocales to take into account variable names (#419). Thanks to Cornel Stefanache.
    • CLI: Fix edge case bug in plural pseudolocalization (#428). Thanks to Eric Plumb.
    • CLI: Fix yarn detection with nps (#441). Thanks to MU AOHUA.

    2.7.2 (2018-11-14)

    Bug Fixes

    • CLI: show more accurate follow-up commands (e.g. show use (yarn compile) ... instead of use (lingui compile) ... when CLI is invoked using yarn extract)
    • CLI: add missing export (regression introduced by #381)

    2.7.1 (2018-11-12)

    Bug Fixes

    • CLI: remove "macros" from the list of babel plugins (#360). Thanks to Jérôme Steunou.
    • Macro: fix ICU message for nested selects (#365). Thanks to Maxim Zemskov.
    • CLI: allow leading space in i18n description comments (#366). Thanks to Maxim Zemskov.
    • Disable Google Clojure Compiler rewritePolyfills behavior (#374). Thanks to Ivan Khilko.
    • Show hint for missing babel-core package (#381).
    • Fix message extracting when Trans component is missing (#389).

    2.7.0 (2018-09-10)

    🔥 Babel Macros 🎣 are finally released! After few weeks of fiddling with API, i18n macros are finally out without a breaking release. This is the first part of RFC-001, final form be delivered in next release.

    Important: Macros are completely optional and Babel plugins will work until v3. It's not mandatory to migrate to macro, but recommended.

    New Features

    Bug Fixes

    • CLI: how help for unrecognized commands (#308). Thanks to An Nguyen.
    • Fix Flow types (#306).

    2.6.1 (2018-09-03)

    Bug Fixes

    • @lingui/cli - Remove opencollective dependency

    2.6.0 (2018-08-31)

    New Features

    Bug Fixes

    • Update peer-dependency on babel-core (#286).
    • Output multiple origins on separate line in PO format (#290).
    • Keep headers in PO format (#294). Thanks to Daniel K..
    • lingui extract - set default BABEL_ENV (required by react-app preset) (#300).
    • Fix @lingui/loader compatibility with Webpack 4 (#297).
    • Fix I18n render prop component to not unmount children component between renders (#302).

    2.5.0 (2018-08-24)

    New Features

    Bug Fixes

    • Handle message compile errors in development (#283)

    2.4.2 (2018-08-19)

    Bug Fixes

    • lingui init - add missing command (#270)

    2.4.1 (2018-08-10)

    Bug Fixes

    • lingui extract - fix path separator on Windows (#262)
    • lingui extract - fix extracting from typescript files (#260)

    2.4.0 (2018-08-09)

    Better support for custom file formats and initial support for Create React App.

    New Features

    • New message catalog format: Gettext PO file (#256)
    • New lingui init command which detects project type and install all required packages (#253)
    • Allow customize messages for missing translations (#255)
    • lingui extract detects create-react-app projects and extracts messages using rect-app babel preset

    Bug Fixes

    • lingui add-locale accepts any valid BCP-47 locale (#182)
    • Flow types are correctly exported for all packages (#250)

    2.3.0 (2018-07-23)

    Long-awaited backlog grooming.

    New Features

    • Add support for locales (aka cultures) (#170). Thanks to Cristi Ingineru.
    • Allow React elements to be used as message variables (#183)
    • Support both Babel 6.x and 7.x (#171, #232, #238)
    • withI18n hoists statics of wrapped component (#166)
    • Date and i18n.date accepts date as a string (#155)
    • lingui extract shows progress (#180)
    • lingui extract throws an error when encountering different defaults for the same message (#200)
    • lingui compile shows useful error when message has syntax errors (#191)

    Bug Fixes

    • Fix internal catalog names to avoid collisions. Internal catalogs are named <original_filename>.json, eg: App.js.json (#244)

    Docs

    2.2.0 (2018-07-04)

    Release dedicated to command line interface.

    New Features

    Bug Fixes

    • Mark all messages in file as obsolete when file is completely removed (#235)
    • Support locales with hyphens in cli compile (#231). Thanks to Leonardo Dino.
    • Extract with format minimal does not set defaults (#222)
    • Use generated message as a default one in sourceLocale catalog (#212)