UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

30 lines (29 loc) 1.79 kB
import type { GetWebappTranslationCallback } from '../../../lib/types/base/translation.js'; export declare const escapeHtmlTranslationValue: (translation: string) => string; export declare const escapeTsTranslationValue: (translation: string) => string; export type TranslationReplaceOptions = { keyPattern?: string; interpolatePattern?: string; wrapTranslation?: string | string[]; escapeHtml?: boolean; stringify?: boolean; }; export declare const replaceTranslationKeysWithText: (getWebappTranslation: GetWebappTranslationCallback, body: string, regexp: string, { keyPattern, interpolatePattern, wrapTranslation, escapeHtml, stringify }?: TranslationReplaceOptions) => string; export declare const createJhiTransformTranslateReplacer: (getWebappTranslation: GetWebappTranslationCallback, translateOptions?: TranslationReplaceOptions) => (body: string) => string; export declare const createJhiTransformTranslateStringifyReplacer: (getWebappTranslation: GetWebappTranslationCallback) => (body: string) => string; export type JHITranslateConverterOptions = { filePath: string; type: string; key: string; interpolate: string; parsedInterpolate: Record<string, string> | undefined; prefix: string; suffix: string; }; export type JHITranslateConverter = (opts: JHITranslateConverterOptions) => string; export declare const replaceTranslateContents: (body: string, filePath: string, regexp: string, converter: JHITranslateConverter) => string; export type JHITranslateReplacerOptions = { prefixPattern?: string; suffixPattern?: string; }; export declare const createJhiTranslateReplacer: (converter: JHITranslateConverter, { prefixPattern, suffixPattern }?: JHITranslateReplacerOptions) => (body: string, filePath: string) => string;