@hyperscript-tools/i18n 4.3.0 → 4.4.0

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 +64 -1
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.0] - 2026-10-10
11
+
12
+ Translations now read as their language. In 4.3.0, 19% of the corpus's translations and 24% of the
13
+ command-shape scripts' translations kept at least one English word, and a third of the corpus kept an
14
+ English event name. Counting only the English a recorded decision does not keep (type names, `url`,
15
+ `debounced at`, …), every one of the 23 languages is now at or under 5% of corpus renders (0.7–4.6%)
16
+ and 10% of command-shape renders (3.9–6.2%), and no translation writes an English event name its
17
+ language has a word for. The words are the owner's vocabulary sheet
18
+ (`docs-internal/multilingual/VOCABULARY_SHEET.md`), decided 2026-10-08.
19
+
20
+ ### Added
21
+
22
+ - **`@hyperfixi/testing-framework`: the English left in a translation is gated.** `english-leaks.ts`
23
+ counts, per render, the English grammar words (the tokens the engine's own parser matched in the
24
+ source), English event names the language's lexicon has a word for, and a nominative `me` beside a
25
+ marker in the 13 languages where that case is wrong. Two shrink-only baselines (the corpus, in
26
+ `test:canonical`, and the command-shape cases, in their shards); `tools/regen-english-leaks-baseline.ts
27
+ --report` prints each language against M2's targets. An English alternative a profile keeps for
28
+ code-switched input, beside a primary that is the language's own, counts as English.
29
+ - **`@lokascript/semantic`: `transition … from … to`** reads and writes in every language (a `source`
30
+ role), and the bare command reads in English. The schema's `destination` role is gone: upstream has
31
+ none, and SOV destination markers read an owned property's owner as an element (tr and qu swapped
32
+ `#foo's *width` silently). English writes `using` for an easing.
33
+ - **`@lokascript/semantic`: `add/remove/hide/show … when <condition>`** in every language, through a
34
+ `condition` role marked with each profile's `when`. It was English in every translation, and refused
35
+ as a bare command.
36
+
37
+ ### Changed
38
+
39
+ - **`@lokascript/semantic` writes each language's own words** for: loop heads (`repeat for x in`,
40
+ `while`, `until`; es `repetir para x en .items`), `I match` / `I am` (written as the third person, and
41
+ back in English as upstream's first person), `does not match`, `fetch … do not throw`, `on first`,
42
+ `go back`, `from elsewhere`, a loop's `index`, `start view transition`, a query's `in`, a conversion's
43
+ `as` (the type name stays English), `the X of Y` inside an expression (es `valor de #price`, ja
44
+ `#priceの値`), `catch` and `finally`, `element x`, and `def` (as the noun "function", es `función
45
+ greet(name)`). bn, th and vi have their own `document` and `window`; he has its own words for all of
46
+ these and for `matches`, `exists`, `or`, `not`, `first`, `next`, `previous`, `closest`, `empty`, `is`,
47
+ `document` and `window`; and the 15 languages that wrote English `forever` have their own (es
48
+ `repetir siempre`, de `endlos`, ja `ずっと`). Every reader still takes the English words. Where a word
49
+ would read back as another (es `en` is also a marker), the translation keeps English's.
50
+ - **`@lokascript/semantic` writes native event names** in he, hi, it, pl, qu, ru, th, uk and vi where
51
+ the lexicon's word reads back; the rest are denylisted with their reasons.
52
+ - **`@lokascript/semantic`: a foreign `put X at start of Y` is written with the language's `prepend`**,
53
+ which English writes back as `put … at start of`.
54
+
55
+ ### Fixed
56
+
57
+ - **`@lokascript/semantic` reads `me` after a marker in the case the marker takes**, as authors write it:
58
+ de `zu mir`, pt `a mim`, pl `do mnie`, ru `ко мне`, uk `до мене`, hi `मुझ में`. Each was read as a
59
+ variable (`zu mir` ran as `to mir`) or refused. Translations still write the nominative.
60
+
61
+ - **`@lokascript/semantic`: `put X at start of Y` translates.** It was refused in all 23 languages: no
62
+ language but English had a pattern for it, and the render wrote `at end of` in its place.
63
+ - **`@lokascript/semantic`: a one-line handler's `put … at end of`** translates in es, id, it, pt, tl and
64
+ uk. The fused handler pattern took the end noun for the destination wherever the language's `at` word
65
+ is also a destination marker.
66
+ - **`@lokascript/semantic`: `^x is …` keeps its copula** in ar, hi and th, which read the `is` word after a
67
+ `^` variable as the pronoun `it`.
68
+ - **`@lokascript/semantic`: an SOV loop body may open with a variable named `index`** (ja `index を …`),
69
+ and `repeat` is never read as an event name.
70
+
10
71
  ## [4.3.0] - 2026-10-07
11
72
 
12
73
  More of what upstream reads now translates, and what does not is refused instead of lost. On the
@@ -1485,7 +1546,9 @@ _Synchronized version release. See git history for details._
1485
1546
  - npm access token stored in GitHub Secrets
1486
1547
  - 2FA recommended for npm organization
1487
1548
 
1488
- [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.2.0...HEAD
1549
+ [Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.4.0...HEAD
1550
+ [4.4.0]: https://github.com/codetalcott/hyperfixi/compare/v4.3.0...v4.4.0
1551
+ [4.3.0]: https://github.com/codetalcott/hyperfixi/compare/v4.2.0...v4.3.0
1489
1552
  [4.2.0]: https://github.com/codetalcott/hyperfixi/compare/v4.1.0...v4.2.0
1490
1553
  [4.1.0]: https://github.com/codetalcott/hyperfixi/compare/v4.0.1...v4.1.0
1491
1554
  [4.0.1]: https://github.com/codetalcott/hyperfixi/compare/v4.0.0...v4.0.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperscript-tools/i18n",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "Build-time translation for hyperscript code samples — generate per-language HTML from a canonical English source",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -48,7 +48,7 @@
48
48
  "author": "HyperFixi Contributors",
49
49
  "license": "MIT",
50
50
  "dependencies": {
51
- "@lokascript/semantic": "^4.3.0",
51
+ "@lokascript/semantic": "^4.4.0",
52
52
  "hyperscript.org": "^0.9.93"
53
53
  },
54
54
  "devDependencies": {