mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
feat: get TRANSLATION_PROVIDER, TRANSLATION_PROVIDER_ENDPOINT & TRANSLATION_PROVIDER_API_KEY enviornment variables
This commit is contained in:
parent
de8eba4079
commit
c6626313bc
1 changed files with 12 additions and 0 deletions
|
|
@ -252,6 +252,18 @@ class Conf {
|
|||
static get preferredLanguages(): LanguageCode[] | undefined {
|
||||
return Deno.env.get('DITTO_LANGUAGES')?.split(',')?.filter(ISO6391.validate) as LanguageCode[];
|
||||
}
|
||||
/** Translation provider used to translate posts. */
|
||||
static get translationProvider(): string | undefined {
|
||||
return Deno.env.get('TRANSLATION_PROVIDER')?.toLowerCase();
|
||||
}
|
||||
/** Translation provider URL endpoint. */
|
||||
static get translationProviderEndpoint(): string | undefined {
|
||||
return Deno.env.get('TRANSLATION_PROVIDER_ENDPOINT');
|
||||
}
|
||||
/** Translation provider API KEY. */
|
||||
static get translationProviderApiKey(): string | undefined {
|
||||
return Deno.env.get('TRANSLATION_PROVIDER_API_KEY');
|
||||
}
|
||||
/** Cache settings. */
|
||||
static caches = {
|
||||
/** NIP-05 cache settings. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue