UNPKG

generaltranslation

Version:

A language toolkit for AI developers

38 lines (37 loc) 1.1 kB
import { Content, DataFormat } from '../types'; /** * ActionType is the type of action to perform on the request. * * @param standard - The standard action type (standard model). * @param fast - The fast action type (mini model). * @param string - Other model */ export type ActionType = 'standard' | 'fast' | string; /** * EntryMetadata is the metadata for a GTRequest. * * @param context - The context of the request. * @param id - The id of the request. * @param hash - The hash of the request. */ export type EntryMetadata = { context?: string; id?: string; hash?: string; dataFormat?: DataFormat; sourceLocale?: string; actionType?: ActionType; timeout?: number; }; /** * GTRequest is a translation request object for {@link JsxChildren} | {@link IcuMessage} | {@link I18nextMessage} * * @param source - The source content to translate. * @param targetLocale - The target locale to translate to. * @param metadata - The metadata for the request. */ export type Entry = { source: Content; targetLocale?: string; metadata?: EntryMetadata; };