@rivinia/i18n 0.8.0 → 1.0.0-rc.1

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,42 @@
1
1
  # @rivinia/i18n
2
2
 
3
- Pre-1.0 policy: a minor bump may break, a patch is a bug fix.
3
+ From 1.0.0 this package follows **strict semver**: only a major may break, a new
4
+ config key, export, token or loader hook is a minor, and a patch never changes
5
+ what a page renders. The contract is wider than the export list: **the
6
+ `provideRiviniaI18n` config keys**, the pipe name (`rvTranslate`), **the loader
7
+ descriptor contract — including the `LoaderContext` a custom loader receives**,
8
+ the ICU placeholder rules, the `--rv-i18n-*` token names, and the declaration
9
+ shape `rivinia-i18n-keys` generates (`RiviniaI18nKeyRegistry`). Changing any of
10
+ those is a major; adding one is a minor. A new token is always additive — the
11
+ toggle and the picker read `var(--rv-i18n-<name>, var(--rv-<semantic>, <previous
12
+ value>))`.
13
+
14
+ Coming from 0.8.0: **nothing to do** — 1.0.0 removes no name and renames none.
15
+ The removals a consumer already met were in 0.6.0 (`RTranslatePipe` /
16
+ `rTranslate`), recorded below, and the freeze that fixed what ships is
17
+ [`docs/API-SURFACE-1.0.md`](https://github.com/abdelfattahqandil21-oss/Revinia/blob/main/docs/API-SURFACE-1.0.md).
18
+ The README is the start-here tier; everyday patterns and the reference live in
19
+ [`docs/i18n/`](https://github.com/abdelfattahqandil21-oss/Revinia/tree/main/docs/i18n),
20
+ one topic per page. This file keeps what a consumer of this package needs,
21
+ including the migration notes for 0.6.0 and 0.4.0.
22
+
23
+ ## 1.0.0-rc.1
24
+
25
+ - **The optional `@rivinia/select` peer is now `^1.0.0-rc.1`** (it was `^0.7.0`, a
26
+ pre-1.0 caret so narrow that a select 0.8 or 1.0 conflicted with it). The range
27
+ admits every select 1.x release, the rc and the final alike, and excludes a 2.0 —
28
+ verified with `semver.satisfies` against the installed semver 7.8.5. Nothing
29
+ changes for an app that never imports `@rivinia/i18n/select`: the peer stays
30
+ `optional` in `peerDependenciesMeta`.
31
+ - **The toggle reads the theme's accent.** `--rv-accent` paints the focus ring
32
+ and the held-down fill (16% over the button's own background). Both read
33
+ `var(--rv-accent, currentColor)`, so a page that does not import
34
+ `@rivinia/theme` renders exactly as before (snapshot-proved).
35
+ - **Forced colors.** `@media (forced-colors: active)` switches the button to
36
+ `Canvas`/`CanvasText`, `Highlight`/`HighlightText` while held, and
37
+ `GrayText` at full opacity when disabled. While held, the focus ring is
38
+ `CanvasText` — a `Highlight` ring on the `Highlight` fill cannot be seen. The
39
+ toggle has no motion, so `prefers-reduced-motion` has nothing to reduce.
4
40
 
5
41
  ## 0.8.0 - 2026-10-31
6
42
 
@@ -219,6 +255,23 @@ names were removed instead of carried to 1.0.
219
255
  - **Behaviour:** none intended. The characterization test (`fallback-after-init`)
220
256
  and the SSR smoke suite were added before the split and pass unchanged after it.
221
257
 
258
+ Migration from 0.5.0 — three names, and the core split is internal:
259
+
260
+ 1. **The pipe is `rvTranslate`.** `RTranslatePipe` (`rTranslate`) was removed with
261
+ no alias to keep:
262
+
263
+ ```html
264
+ <!-- before -->
265
+ {{ 'booking.seats' | rTranslate: { count: seats } }}
266
+ <!-- after -->
267
+ {{ 'booking.seats' | rvTranslate: { count: seats } }}
268
+ ```
269
+
270
+ 2. **`languageChanged` is gone.** It was the same signal as `currentLanguage`;
271
+ switch your reads to `currentLanguage`.
272
+ 3. **`loadTranslations(id, { silent })` is now `loadTranslations(id)`.** `silent`
273
+ never did anything — background loads are an internal concern.
274
+
222
275
  ## 0.5.0
223
276
 
224
277
  The 0.4.0 code-review set. 0.4.1 was never published, so its fixes ship here;
@@ -306,6 +359,21 @@ The production-hardening release. Additive API; two behaviour changes.
306
359
  Behaviour changes: `#` inside a plural uses the locale's digits
307
360
  (`ar-EG`: `٣`), and an unresolved key warns once per session in dev mode.
308
361
 
362
+ Migration from 0.3.3 — everything below is additive; no export was removed and no
363
+ import path changed. Two behaviour changes are worth reading:
364
+
365
+ 1. **`#` in a plural now uses the locale's digits.** It is formatted with
366
+ `Intl.NumberFormat(locale)` instead of the raw number, so a locale whose default
367
+ numbering system is not Latin (for example `ar-EG`) renders `٣` where it used to
368
+ render `3`. `en` and `ar` are unchanged.
369
+ 2. **Missing keys warn in dev mode.** A key that resolves to nothing now logs
370
+ `[rivinia/i18n] missing key "…"` once per session when `isDevMode()` is true. Set
371
+ `warnOnMissingKey: false`, or pass `onMissingKey`, to control it.
372
+
373
+ The default loader is unchanged (`i18n/{language}.json`); `jsonLoader({ path:
374
+ 'assets/i18n' })` keeps the old layout. The internal source layout moved
375
+ (models/services/utils/providers/pipes), but nothing under `src/` was ever exported.
376
+
309
377
  ## 0.3.0
310
378
 
311
379
  - **Breaking:** the default `jsonLoader()` path is `i18n` (files in