langsys-js-react 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## 0.6.4 - 2026-08-16
2
+
3
+ ### Fixed
4
+
5
+ - **Base SDK bumped to `langsys-js-typescript@^0.6.4` — fixes raw ICU message source rendering to the page.** Unlike the recent bumps, this one changes what your users see. When an ICU argument was missing, the base SDK fell back to the simple `{key}` interpolator, whose pattern deliberately can't match an ICU slot — so the entire construct passed through untouched:
6
+
7
+ ```
8
+ before: {name_gender, select, male {Bienvenido} female {Bienvenida} other {Bienvenide}} Sarah
9
+ after: Bienvenide Sarah
10
+ ```
11
+
12
+ **This is reachable without any mistake on your part**, which is why it's worth upgrading for: langsys-ai's ICU promoter can *introduce* a `select` argument the source phrase never had — a plain `%name%` / `{name}` becomes `{name_gender, select, …}` in gendered target locales. Your app can't supply `name_gender`, because it doesn't exist in the phrase you wrote and nothing tells you the translation grew one. Any React app translating into a gendered locale could hit this, through either `t()` or `<Translate params>` / `<Phrase params>`.
13
+
14
+ Recovery is aligned with `langsys-php` so a shared catalog can't render two different sentences: a missing `select` argument takes the `other` branch (a correct sentence — `other` is what an unknown gender should render), and a missing `plural` argument takes `other` with `#` rendered as `{count}` (nothing can be inferred for a count, so the sentence survives with a visible gap).
15
+
16
+ - **A `null` param now counts as missing rather than coercing to `0`.** Previously `{count, plural, …}` with `count: null` rendered `0 items` — identical to a genuine `count: 0`, so a failure to pass the value and an empty cart produced the same string on screen, in screenshots, and in bug reports. A real `0` still renders `0 items`; only `null` now takes the recovery path.
17
+
1
18
  ## 0.6.3 - 2026-08-16
2
19
 
3
20
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsys-js-react",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "React binding for the Langsys translation SDK — realtime continuous translations with automatic token discovery, delivered as hooks and a <Translate> component.",
5
5
  "author": "Langsys",
6
6
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "react": "^18.0.0 || ^19.0.0"
62
62
  },
63
63
  "dependencies": {
64
- "langsys-js-typescript": "^0.6.3"
64
+ "langsys-js-typescript": "^0.6.4"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@eslint/js": "^9.0.0",