Features: 1) Update DeepL API URL to standard endpoint in deepl_translate.py and translate_fields.py;
Fixes: 1) None; Extra: 1) Replaced deprecated API-free URL with standard DeepL API URL for consistency.
This commit is contained in:
parent
797e56a0cd
commit
88133b2f93
2 changed files with 2 additions and 2 deletions
|
|
@ -207,7 +207,7 @@ class Command(BaseCommand):
|
|||
('auth_key', auth_key),
|
||||
('target_lang', api_code),
|
||||
] + [('text', t) for t in protected]
|
||||
resp = requests.post('https://api-free.deepl.com/v2/translate', data=data)
|
||||
resp = requests.post('https://api.deepl.com/v2/translate', data=data)
|
||||
try:
|
||||
resp.raise_for_status()
|
||||
result = resp.json()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import requests
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.db import transaction
|
||||
|
||||
DEEPL_API_URL = "https://api-free.deepl.com/v2/translate"
|
||||
DEEPL_API_URL = "https://api.deepl.com"
|
||||
|
||||
DEEPL_TARGET_LANGUAGES_MAPPING = {
|
||||
"en-gb": "EN-GB",
|
||||
|
|
|
|||
Loading…
Reference in a new issue