Skip to content

Commit

Permalink
fix: rename useFreeApi to useFreeApiEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtGokhan authored and antfu committed May 4, 2021
1 parent df8bb7f commit 10923e8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"config.annotations": "Enable the inline annotations.",
"config.deepl_api_key": "API key to use DeepL translate engine",
"config.deepl_log": "Show DeepL engine debug logs",
"config.deepl_use_free_api": "Use DeepL API Free plan",
"config.deepl_use_free_api_entry": "Use DeepL Free API entry point",
"config.default_namespace": "Global default namespace",
"config.deprecated": "Deprecated. Use \"i18n-ally.\" prefix instead.",
"config.derived_keys": "Rules to mark derived keys in the usage report",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -941,10 +941,10 @@
"default": false,
"description": "%config.deepl_log%"
},
"i18n-ally.translate.deepl.useFreeApi": {
"i18n-ally.translate.deepl.useFreeApiEntry": {
"type": "boolean",
"default": false,
"description": "%config.deepl_use_free_api%"
"description": "%config.deepl_use_free_api_entry%"
},
"i18n-ally.usage.scanningIgnore": {
"type": "array",
Expand Down
4 changes: 2 additions & 2 deletions src/core/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ export class Config {
return this.getConfig<string | null | undefined>('translate.deepl.apiKey')
}

static get deeplUseFreeApi() {
return this.getConfig<boolean>('translate.deepl.useFreeApi')
static get deeplUseFreeApiEntry() {
return this.getConfig<boolean>('translate.deepl.useFreeApiEntry')
}

static get deeplLog(): Boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/translators/engines/deepl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface DeepLTranslateRes {
const deepl = axios.create({})

deepl.interceptors.request.use((req) => {
req.baseURL = Config.deeplUseFreeApi
req.baseURL = Config.deeplUseFreeApiEntry
? 'https://api-free.deepl.com/v2'
: 'https://api.deepl.com/v2'

Expand Down

0 comments on commit 10923e8

Please sign in to comment.