ngx-translate-multi-http-loader 18.1.1 → 19.0.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.
package/README.md
CHANGED
@@ -15,6 +15,9 @@ Get the complete changelog here: https://github.com/rbalet/ngx-translate-multi-h
|
|
15
15
|
* [Usage](#usage)
|
16
16
|
* [Error & BugFix](#possible-error--bugfix)
|
17
17
|
|
18
|
+
## breaking change: v19.0.0
|
19
|
+
* Uses `mergeDeep` from `@ngx-translate/core@16` making it's `v16` mandatory
|
20
|
+
|
18
21
|
## breaking change: v9.0.0
|
19
22
|
* This library is now using `httpBackend` instead of the `httpClient`, to avoid being delayed by interceptor, which was creating errors while loading.
|
20
23
|
* From the v9, the library will only be using a list of `string[]` so `prefix` & `suffix` aren't needed anymore and `.json` gonna be the default suffix.
|
@@ -23,18 +26,17 @@ Get the complete changelog here: https://github.com/rbalet/ngx-translate-multi-h
|
|
23
26
|
|
24
27
|
We assume that you already installed [ngx-translate](https://github.com/ngx-translate/core).
|
25
28
|
|
26
|
-
Now you need to install the npm module for `MultiTranslateHttpLoader`:
|
27
|
-
[deepmerge-ts](https://www.npmjs.com/package/deepmerge-ts) may also need to be installed _should be done automatically though_
|
29
|
+
Now you need to install the npm module for `MultiTranslateHttpLoader`:
|
28
30
|
|
29
31
|
```sh
|
30
32
|
npm install ngx-translate-multi-http-loader
|
31
|
-
npm install deepmerge-ts
|
32
33
|
```
|
33
34
|
|
34
35
|
Choose the version corresponding to your Angular version:
|
35
36
|
|
36
37
|
| Angular | @ngx-translate/core | ngx-translate-multi-http-loader |
|
37
38
|
| ------- | ------------------- | ------------------------------- |
|
39
|
+
| >= 16 | 16.x+ | >= 19.x+ |
|
38
40
|
| >= 16 | 15.x+ | >= 15.x+ |
|
39
41
|
| 15 | 14.x+ | 9.x+ |
|
40
42
|
| 14 | 14.x+ | 8.x+ |
|
@@ -77,7 +79,7 @@ export function HttpLoaderFactory(_httpBackend: HttpBackend) {
|
|
77
79
|
export class AppModule { }
|
78
80
|
```
|
79
81
|
|
80
|
-
The `MultiTranslateHttpLoader` takes a list of `string[]` or `
|
82
|
+
The `MultiTranslateHttpLoader` takes a list of `string[]` or `TranslationResource[]`.
|
81
83
|
|
82
84
|
### String[]
|
83
85
|
For example `['/assets/i18n/core/', '/assets/i18n/vendors/']`,
|
@@ -102,23 +104,14 @@ export function HttpLoaderFactory(_httpBackend: HttpBackend) {
|
|
102
104
|
}
|
103
105
|
```
|
104
106
|
|
105
|
-
The loader will merge all translation files from the server
|
107
|
+
The loader will merge all translation files from the server
|
106
108
|
|
107
109
|
|
108
110
|
## Possible error & Bugfix
|
109
|
-
### Can't resolve 'deepmerge-ts'
|
110
|
-
1. run `npm i deepmerge-ts`
|
111
|
-
|
112
|
-
This is due to some version of npm not being able to download peerDependencies properly.
|
113
|
-
|
114
|
-
I decided to **not** move it under dependencies since it's considered to be a bad practice.
|
115
|
-
|
116
111
|
### values.at is not a function
|
117
112
|
1. Install `core-js`
|
118
113
|
2. In `polyfills.ts`, add `import 'core-js/modules/es.array.at'`
|
119
114
|
|
120
|
-
`deepmerge-ts@5` uses `Array.at`, which is [not supported](https://caniuse.com/?search=array.at) in _not so_ old versions of Safari `< 15.4`.
|
121
|
-
|
122
115
|
|
123
116
|
## Authors and acknowledgment
|
124
117
|
* maintainer [Raphaël Balet](https://github.com/rbalet)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
2
|
+
import { mergeDeep } from '@ngx-translate/core';
|
2
3
|
import { forkJoin, of } from 'rxjs';
|
3
4
|
import { catchError, map } from 'rxjs/operators';
|
4
5
|
export class MultiTranslateHttpLoader {
|
@@ -25,33 +26,11 @@ export class MultiTranslateHttpLoader {
|
|
25
26
|
return of({});
|
26
27
|
}));
|
27
28
|
});
|
28
|
-
return forkJoin(requests).pipe(map((response) => response.reduce((acc, curr) =>
|
29
|
+
return forkJoin(requests).pipe(map((response) => response.reduce((acc, curr) => mergeDeep(acc, curr), {})));
|
29
30
|
}
|
30
31
|
// @ToDo: Use it from ngx-translate once it gets exported: https://github.com/rbalet/ngx-translate-multi-http-loader/issues/35
|
31
32
|
isObject(item) {
|
32
33
|
return item && typeof item === 'object' && !Array.isArray(item);
|
33
34
|
}
|
34
|
-
mergeDeep(target, source) {
|
35
|
-
const output = Object.assign({}, target);
|
36
|
-
if (!this.isObject(target)) {
|
37
|
-
return this.mergeDeep({}, source);
|
38
|
-
}
|
39
|
-
if (this.isObject(target) && this.isObject(source)) {
|
40
|
-
Object.keys(source).forEach((key) => {
|
41
|
-
if (this.isObject(source[key])) {
|
42
|
-
if (!(key in target)) {
|
43
|
-
Object.assign(output, { [key]: source[key] });
|
44
|
-
}
|
45
|
-
else {
|
46
|
-
output[key] = this.mergeDeep(target[key], source[key]);
|
47
|
-
}
|
48
|
-
}
|
49
|
-
else {
|
50
|
-
Object.assign(output, { [key]: source[key] });
|
51
|
-
}
|
52
|
-
});
|
53
|
-
}
|
54
|
-
return output;
|
55
|
-
}
|
56
35
|
}
|
57
|
-
//# sourceMappingURL=data:application/json;base64,
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGktaHR0cC1sb2FkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9tdWx0aS1odHRwLWxvYWRlci9zcmMvbGliL211bHRpLWh0dHAtbG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBZSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQTtBQUM5RCxPQUFPLEVBQUUsU0FBUyxFQUFtQixNQUFNLHFCQUFxQixDQUFBO0FBQ2hFLE9BQU8sRUFBRSxRQUFRLEVBQWMsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQy9DLE9BQU8sRUFBRSxVQUFVLEVBQUUsR0F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cnJvcihyZXMpXG4gICAgICAgICAgICBjb25zb2xlLmdyb3VwRW5kKClcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG9mKHt9KVxuICAgICAgICB9KSxcbiAgICAgIClcbiAgICB9KVxuXG4gICAgcmV0dXJuIGZvcmtKb2luKHJlcXVlc3RzKS5waXBlKFxuICAgICAgbWFwKChyZXNwb25zZSkgPT4gcmVzcG9uc2UucmVkdWNlKChhY2MsIGN1cnIpID0+IG1lcmdlRGVlcChhY2MsIGN1cnIpLCB7fSkpLFxuICAgIClcbiAgfVxuXG4gIC8vIEBUb0RvOiBVc2UgaXQgZnJvbSBuZ3gtdHJhbnNsYXRlIG9uY2UgaXQgZ2V0cyBleHBvcnRlZDogaHR0cHM6Ly9naXRodWIuY29tL3JiYWxldC9uZ3gtdHJhbnNsYXRlLW11bHRpLWh0dHAtbG9hZGVyL2lzc3Vlcy8zNVxuICBpc09iamVjdChpdGVtOiBhbnkpOiBib29sZWFuIHtcbiAgICByZXR1cm4gaXRlbSAmJiB0eXBlb2YgaXRlbSA9PT0gJ29iamVjdCcgJiYgIUFycmF5LmlzQXJyYXkoaXRlbSlcbiAgfVxufVxuIl19
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
2
|
+
import { mergeDeep } from '@ngx-translate/core';
|
2
3
|
import { of, forkJoin } from 'rxjs';
|
3
4
|
import { catchError, map } from 'rxjs/operators';
|
4
5
|
|
@@ -26,34 +27,12 @@ class MultiTranslateHttpLoader {
|
|
26
27
|
return of({});
|
27
28
|
}));
|
28
29
|
});
|
29
|
-
return forkJoin(requests).pipe(map((response) => response.reduce((acc, curr) =>
|
30
|
+
return forkJoin(requests).pipe(map((response) => response.reduce((acc, curr) => mergeDeep(acc, curr), {})));
|
30
31
|
}
|
31
32
|
// @ToDo: Use it from ngx-translate once it gets exported: https://github.com/rbalet/ngx-translate-multi-http-loader/issues/35
|
32
33
|
isObject(item) {
|
33
34
|
return item && typeof item === 'object' && !Array.isArray(item);
|
34
35
|
}
|
35
|
-
mergeDeep(target, source) {
|
36
|
-
const output = Object.assign({}, target);
|
37
|
-
if (!this.isObject(target)) {
|
38
|
-
return this.mergeDeep({}, source);
|
39
|
-
}
|
40
|
-
if (this.isObject(target) && this.isObject(source)) {
|
41
|
-
Object.keys(source).forEach((key) => {
|
42
|
-
if (this.isObject(source[key])) {
|
43
|
-
if (!(key in target)) {
|
44
|
-
Object.assign(output, { [key]: source[key] });
|
45
|
-
}
|
46
|
-
else {
|
47
|
-
output[key] = this.mergeDeep(target[key], source[key]);
|
48
|
-
}
|
49
|
-
}
|
50
|
-
else {
|
51
|
-
Object.assign(output, { [key]: source[key] });
|
52
|
-
}
|
53
|
-
});
|
54
|
-
}
|
55
|
-
return output;
|
56
|
-
}
|
57
36
|
}
|
58
37
|
|
59
38
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-translate-multi-http-loader.mjs","sources":["../../../projects/multi-http-loader/src/lib/multi-http-loader.ts","../../../projects/multi-http-loader/src/ngx-translate-multi-http-loader.ts"],"sourcesContent":["import { HttpBackend, HttpClient } from '@angular/common/http'\nimport { TranslateLoader } from '@ngx-translate/core'\nimport { forkJoin, Observable, of } from 'rxjs'\nimport { catchError, map } from 'rxjs/operators'\n\nexport interface
|
1
|
+
{"version":3,"file":"ngx-translate-multi-http-loader.mjs","sources":["../../../projects/multi-http-loader/src/lib/multi-http-loader.ts","../../../projects/multi-http-loader/src/ngx-translate-multi-http-loader.ts"],"sourcesContent":["import { HttpBackend, HttpClient } from '@angular/common/http'\nimport { mergeDeep, TranslateLoader } from '@ngx-translate/core'\nimport { forkJoin, Observable, of } from 'rxjs'\nimport { catchError, map } from 'rxjs/operators'\n\nexport interface TranslationResource {\n prefix: string\n suffix?: string\n optional?: boolean\n}\n\nexport class MultiTranslateHttpLoader implements TranslateLoader {\n constructor(\n private _handler: HttpBackend,\n private _resourcesPrefix: string[] | TranslationResource[],\n ) {}\n\n public getTranslation(lang: string): Observable<any> {\n const requests: Observable<Object | {}>[] = this._resourcesPrefix.map((resource) => {\n let path: string\n\n if (typeof resource === 'string') path = `${resource}${lang}.json`\n else path = `${resource.prefix}${lang}${resource.suffix || '.json'}`\n\n return new HttpClient(this._handler).get(path).pipe(\n catchError((res) => {\n if (typeof resource !== 'string' && !resource.optional) {\n console.group()\n console.error('Something went wrong for the following translation file:', path)\n console.error(res)\n console.groupEnd()\n }\n return of({})\n }),\n )\n })\n\n return forkJoin(requests).pipe(\n map((response) => response.reduce((acc, curr) => mergeDeep(acc, curr), {})),\n )\n }\n\n // @ToDo: Use it from ngx-translate once it gets exported: https://github.com/rbalet/ngx-translate-multi-http-loader/issues/35\n isObject(item: any): boolean {\n return item && typeof item === 'object' && !Array.isArray(item)\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,wBAAwB,CAAA;AAEzB,IAAA,QAAA,CAAA;AACA,IAAA,gBAAA,CAAA;IAFV,WACU,CAAA,QAAqB,EACrB,gBAAkD,EAAA;QADlD,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAa;QACrB,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAkC;KACxD;AAEG,IAAA,cAAc,CAAC,IAAY,EAAA;QAChC,MAAM,QAAQ,GAA8B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAI;AACjF,YAAA,IAAI,IAAY,CAAA;YAEhB,IAAI,OAAO,QAAQ,KAAK,QAAQ;AAAE,gBAAA,IAAI,GAAG,CAAG,EAAA,QAAQ,CAAG,EAAA,IAAI,OAAO,CAAA;;AAC7D,gBAAA,IAAI,GAAG,CAAA,EAAG,QAAQ,CAAC,MAAM,CAAG,EAAA,IAAI,CAAG,EAAA,QAAQ,CAAC,MAAM,IAAI,OAAO,EAAE,CAAA;YAEpE,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CACjD,UAAU,CAAC,CAAC,GAAG,KAAI;gBACjB,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;oBACtD,OAAO,CAAC,KAAK,EAAE,CAAA;AACf,oBAAA,OAAO,CAAC,KAAK,CAAC,0DAA0D,EAAE,IAAI,CAAC,CAAA;AAC/E,oBAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;oBAClB,OAAO,CAAC,QAAQ,EAAE,CAAA;iBACnB;AACD,gBAAA,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;aACd,CAAC,CACH,CAAA;AACH,SAAC,CAAC,CAAA;AAEF,QAAA,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC5B,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAC5E,CAAA;KACF;;AAGD,IAAA,QAAQ,CAAC,IAAS,EAAA;AAChB,QAAA,OAAO,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;KAChE;AACF;;AC9CD;;AAEG;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { HttpBackend } from '@angular/common/http';
|
2
2
|
import { TranslateLoader } from '@ngx-translate/core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
|
-
export interface
|
4
|
+
export interface TranslationResource {
|
5
5
|
prefix: string;
|
6
6
|
suffix?: string;
|
7
7
|
optional?: boolean;
|
@@ -9,8 +9,7 @@ export interface ITranslationResource {
|
|
9
9
|
export declare class MultiTranslateHttpLoader implements TranslateLoader {
|
10
10
|
private _handler;
|
11
11
|
private _resourcesPrefix;
|
12
|
-
constructor(_handler: HttpBackend, _resourcesPrefix: string[] |
|
12
|
+
constructor(_handler: HttpBackend, _resourcesPrefix: string[] | TranslationResource[]);
|
13
13
|
getTranslation(lang: string): Observable<any>;
|
14
14
|
isObject(item: any): boolean;
|
15
|
-
mergeDeep(target: any, source: any): any;
|
16
15
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ngx-translate-multi-http-loader",
|
3
|
-
"version": "
|
3
|
+
"version": "19.0.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": {
|
6
6
|
"name": "Raphaël Balet",
|
@@ -23,12 +23,12 @@
|
|
23
23
|
"url": "https://github.com/rbalet/ngx-translate-multi-http-loader"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"tslib": "^2.
|
26
|
+
"tslib": "^2.8.1"
|
27
27
|
},
|
28
28
|
"peerDependencies": {
|
29
29
|
"@angular/common": ">=13.0.0",
|
30
30
|
"@angular/core": ">=13.0.0",
|
31
|
-
"@ngx-translate/core": ">=
|
31
|
+
"@ngx-translate/core": ">=16.0.3",
|
32
32
|
"rxjs": "^7.8.1"
|
33
33
|
},
|
34
34
|
"module": "fesm2022/ngx-translate-multi-http-loader.mjs",
|
@@ -45,4 +45,4 @@
|
|
45
45
|
}
|
46
46
|
},
|
47
47
|
"sideEffects": false
|
48
|
-
}
|
48
|
+
}
|