mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
DittoTranslator: move provider to top of interface
This commit is contained in:
parent
12d643e150
commit
655e94ef91
1 changed files with 2 additions and 2 deletions
|
|
@ -2,6 +2,8 @@ import type { LanguageCode } from 'iso-639-1';
|
||||||
|
|
||||||
/** DittoTranslator class, used for status translation. */
|
/** DittoTranslator class, used for status translation. */
|
||||||
export interface DittoTranslator {
|
export interface DittoTranslator {
|
||||||
|
/** Provider name, eg `DeepL.com` */
|
||||||
|
provider: string;
|
||||||
/** Translate the 'content' into 'targetLanguage'. */
|
/** Translate the 'content' into 'targetLanguage'. */
|
||||||
translate(
|
translate(
|
||||||
/** Texts to translate. */
|
/** Texts to translate. */
|
||||||
|
|
@ -13,6 +15,4 @@ export interface DittoTranslator {
|
||||||
/** Custom options. */
|
/** Custom options. */
|
||||||
opts?: { signal?: AbortSignal },
|
opts?: { signal?: AbortSignal },
|
||||||
): Promise<{ results: string[]; source_lang: LanguageCode }>;
|
): Promise<{ results: string[]; source_lang: LanguageCode }>;
|
||||||
/** Provider name, eg `DeepL.com` */
|
|
||||||
provider: string;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue