11import {
2- computed ,
3- inject ,
4- Injectable ,
5- InjectionToken ,
6- isSignal ,
7- Signal ,
8- signal ,
2+ computed ,
3+ inject ,
4+ Injectable ,
5+ InjectionToken ,
6+ isSignal ,
7+ Signal ,
8+ signal ,
99} from "@angular/core" ;
1010import { takeUntilDestroyed } from "@angular/core/rxjs-interop" ;
1111import { concat , defer , EMPTY , finalize , forkJoin , isObservable , merge , Observable , of , Subject , tap } from "rxjs" ;
@@ -14,22 +14,22 @@ import { DefaultMissingTranslationHandler, MissingTranslationHandler } from "./m
1414import { TranslateCompiler } from "./translate.compiler" ;
1515import { TranslateLoader } from "./translate.loader" ;
1616import { TranslateParser } from "./translate.parser" ;
17- import { DeepReadonly , TranslateStore } from "./translate.store" ;
18- import { insertValue , isArray , isDefinedAndNotNull , isDict , isString } from "./util" ;
1917import {
20- DefaultLangChangeEvent ,
21- FallbackLangChangeEvent ,
22- InterpolatableTranslation ,
23- InterpolatableTranslationObject ,
24- InterpolationParameters ,
25- ITranslateService ,
26- LangChangeEvent ,
27- Language ,
28- StrictTranslation ,
29- Translation ,
30- TranslationChangeEvent ,
31- TranslationObject ,
18+ DefaultLangChangeEvent ,
19+ FallbackLangChangeEvent ,
20+ InterpolatableTranslation ,
21+ InterpolatableTranslationObject ,
22+ InterpolationParameters ,
23+ ITranslateService ,
24+ LangChangeEvent ,
25+ Language ,
26+ StrictTranslation ,
27+ Translation ,
28+ TranslationChangeEvent ,
29+ TranslationObject ,
3230} from "./translate.service.interface" ;
31+ import { DeepReadonly , TranslateStore } from "./translate.store" ;
32+ import { insertValue , isArray , isDefinedAndNotNull , isDict , isString } from "./util" ;
3333
3434/**
3535 * Configuration object for the translation service.
@@ -329,7 +329,7 @@ export class TranslateService implements ITranslateService {
329329 const translations$ = this . currentLoader . getTranslation ( lang ) . pipe (
330330 map ( ( res : TranslationObject ) => this . compiler . compileTranslations ( res , lang ) ) ,
331331 tap ( ( compiled : InterpolatableTranslationObject ) => {
332- this . store . setTranslations ( lang , compiled , false ) ;
332+ this . store . setTranslations ( lang , compiled ) ;
333333 } ) ,
334334 finalize ( ( ) => {
335335 delete this . loadingTranslations [ lang ] ;
@@ -358,11 +358,10 @@ export class TranslateService implements ITranslateService {
358358 public setTranslation (
359359 lang : Language ,
360360 translations : TranslationObject ,
361- shouldMerge = false ,
362361 ) : void {
363362 const interpolatableTranslations : InterpolatableTranslationObject =
364363 this . compiler . compileTranslations ( translations , lang ) ;
365- this . store . setTranslations ( lang , interpolatableTranslations , shouldMerge ) ;
364+ this . store . setTranslations ( lang , interpolatableTranslations ) ;
366365 }
367366
368367 public getLangs ( ) : readonly Language [ ] {
@@ -673,7 +672,6 @@ export class TranslateService implements ITranslateService {
673672 ? this . compiler . compile ( translation , lang )
674673 : this . compiler . compileTranslations ( translation , lang ) ,
675674 ) ,
676- false ,
677675 ) ;
678676 }
679677
0 commit comments