UNPKG

@vtex/api

Version:
15 lines (14 loc) 865 B
import { Behavior } from '../../../../../clients'; import { IOContext } from '../../typings'; export declare const CONTEXT_REGEX: RegExp; export declare const FROM_REGEX: RegExp; export declare const CONTENT_REGEX: RegExp; export interface TranslatableMessageV2 { from?: string; content: string; context?: string; } export type TranslationDirectiveType = 'translatableV2' | 'translateTo'; export declare const parseTranslatableStringV2: (rawMessage: string) => TranslatableMessageV2; export declare const formatTranslatableStringV2: ({ from, content, context }: TranslatableMessageV2) => string; export declare const handleSingleString: (ctx: IOContext, loader: import("dataloader")<import("../../../../../clients").Message, string>, behavior: Behavior, directiveName: TranslationDirectiveType) => (rawMessage: string | null) => Promise<string | null>;