UNPKG

@o3r/localization

Version:

This module provides a runtime dynamic language/translation support and debug tools.

40 lines 1.86 kB
import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core'; import { TranslatePipe, TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { LocalizationConfiguration } from '../core'; import { LocalizationService } from './localization.service'; import * as i0 from "@angular/core"; /** * TranslatePipe class adding debug functionality */ export declare class O3rLocalizationTranslatePipe extends TranslatePipe implements PipeTransform, OnDestroy { protected readonly localizationService: LocalizationService; protected readonly changeDetector: ChangeDetectorRef; protected readonly localizationConfig: LocalizationConfiguration; /** * Internal subscription to the LocalizationService showKeys mode changes */ protected readonly onShowKeysChange?: Subscription; /** * Internal subscription to the LocalizationService key mapping */ protected onKeyChange?: Subscription; /** * Should we display keys instead of translations */ protected showKeys: boolean; /** last key queried */ protected lastQueryKey?: string; /** last key resolved */ protected lastResolvedKey?: string; constructor(localizationService: LocalizationService, translateService: TranslateService, changeDetector: ChangeDetectorRef, localizationConfig: LocalizationConfiguration); /** * Calls original transform method and eventually outputs the key if debugMode (in LocalizationConfiguration) is enabled * @inheritdoc */ transform(query: string, ...args: any[]): any; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<O3rLocalizationTranslatePipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<O3rLocalizationTranslatePipe, "o3rTranslate", false>; } //# sourceMappingURL=localization-translate.pipe.d.ts.map