Skip to content

Commit 5435da7

Browse files
committed
docs(transloco): ✏️ update breaking changes file
1 parent 1d24198 commit 5435da7

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

BREAKING_CHANGES.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,67 @@
1+
# Transloco v8
2+
3+
## Transloco
4+
5+
### Removed Utility Functions from Public API
6+
7+
**Commit**: `aae425b6` - "chore(transloco): 🤖 move to @jsverse/utils"
8+
9+
Many utility functions have been removed from `@jsverse/transloco`. some were moved to `@jsverse/utils` and some were internal only:
10+
11+
#### Moved to `@jsverse/utils`
12+
13+
- `isFunction()`, `isString()`, `isNumber()`, `isObject()`, `isNil()`, `isDefined()`
14+
- `size()`, `isEmpty()` - Collection utilities
15+
- `coerceArray()`, `toCamelCase()`, `toNumber()` - Conversion utilities
16+
17+
#### Internal Utilities - Removed from public API
18+
19+
- `shouldListenToLangChanges()`, `listenOrNotOperator()`, `resolveInlineLoader()`
20+
- `getEventPayload()`, `isScopeObject()`, `hasInlineLoader()`
21+
- `getPipeValue()`, `getLangFromScope()`, `getScopeFromLang()`
22+
- `flatten()`, `unflatten()`
23+
24+
### Angular Schematics Updates
25+
26+
**Commit**: `6cd2f3e2` - "refactor(transloco): 💡 Remove all the schematics but init"
27+
28+
Removed schematics from `@jsverse/transloco`:
29+
30+
- `component` (alias: `c`) - Component generation
31+
- `migrate` (alias: `m`) - Migration utilities
32+
- `scope` (alias: `s`) - Scope generation
33+
- `upgrade` (alias: `up`) - Upgrade utilities
34+
- `keys-manager` (alias: `km`) - Keys manager
35+
- `join` (alias: `build`) - Join translation files
36+
- `split` (alias: `sp`) - Split translation files
37+
- `ng-migrate` - Angular i18n migration
38+
39+
Only `ng-add` remains in the main package.
40+
41+
**Migration**: Install `@jsverse/transloco-schematics` for the moved schematics:
42+
43+
```bash
44+
npm install @jsverse/transloco-schematics --save-dev
45+
ng generate @jsverse/transloco-schematics:scope my-scope
46+
```
47+
48+
## Transloco Locale
49+
50+
### Service Initialization Changes
51+
52+
**Commit**: `73d21aa0` - "feat(locale): improve locale detection logic in locale service (#862)"
53+
**File**: `libs/transloco-locale/src/lib/transloco-locale.service.ts`
54+
55+
The `TranslocoLocaleService` constructor now includes initialization logic that changes locale detection:
56+
57+
- Service now proactively detects locale in this order:
58+
1. Browser locale (via `getBrowserCultureLang()`)
59+
2. Active language from TranslocoService
60+
3. Default locale
61+
- Locale is set during service construction rather than lazily
62+
63+
**Migration**: If you were setting locale immediately after service injection, review your initialization logic.
64+
165
# Transloco v7
266

367
Packages were moved to the jsverse scope, the versioning continues from the last version of the previous scope.

0 commit comments

Comments
 (0)