@vendure/ngx-translate-extract
Version:
Extract strings from projects using ngx-translate
14 lines (13 loc) • 852 B
TypeScript
import { AST, TmplAstNode, BindingPipe, LiteralPrimitive, Conditional } from '@angular/compiler';
import { ParserInterface } from './parser.interface.js';
import { TranslationCollection } from '../utils/translation.collection.js';
export declare const TRANSLATE_PIPE_NAMES: string[];
export declare class PipeParser implements ParserInterface {
extract(source: string, filePath: string): TranslationCollection;
protected findPipesInNode(node: any): BindingPipe[];
protected parseTranslationKeysFromPipe(pipeContent: BindingPipe | LiteralPrimitive | Conditional): string[];
protected getTranslatablesFromAst(ast: AST): BindingPipe[];
protected getTranslatablesFromAsts(asts: AST[]): BindingPipe[];
protected flatten<T extends AST>(array: T[][]): T[];
protected parseTemplate(template: string, path: string): TmplAstNode[];
}