deepl api integration ajax and test for language setting detection

This commit is contained in:
Halit Celik 2021-06-03 14:24:40 +02:00
parent b5a97811ac
commit 9364126efc
3 changed files with 16 additions and 5 deletions

Binary file not shown.

View file

@ -9,19 +9,20 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-14 02:28-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2021-05-28 09:19-0551\n"
"Last-Translator: b' <halit@cruncher.ch>'\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"X-Translated-Using: django-rosetta 0.9.7\n"
#: templates/test.html:3
#, fuzzy
msgid "Some text to translate"
msgstr "Crunchum ipsum dolor sit coder void, constructor function"
msgstr "Du texte à traduire"
#: templates/test.html:5
#, python-format
@ -34,7 +35,6 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
#: templates/test.html:3
msgid "We need %(num_bottles)s bottles!"
msgstr ""

View file

@ -78,6 +78,7 @@ LANGUAGES = (
('fr_FR.utf8', u'French (France), UTF8'),
)
SILENCED_SYSTEM_CHECKS = ["translation.E002"]
@ -126,4 +127,14 @@ ROSETTA_SHOW_AT_ADMIN_PANEL = True
# fake azure key that matches the one in
# fixtures/vcr_cassettes/test_47_azure_ajax_translation.yaml
AZURE_CLIENT_SECRET = 'FAKE'
AZURE_CLIENT_SECRET = None # "FAKE"
DEEPL_AUTH_KEY = "409de4f4-cfd0-d1f3-c1d5-9fab3ff84a13"
# Deepl API language codes are different then those of django, so if this is not set according to your desired languages,
# We use the uppercase version of the first 2 letters of django language code.
# In which case it would work fine for most of the languages,
# But for 'en' if you want "EN-GB" for example, please set it in this dictionary.
# Please check the supported languages list of DeepL API: https://www.deepl.com/docs-api/translating-text/request/
DEEPL_LANGUAGES = {"fr": "FR", "en": "EN-GB", "zh_Hans": "ZH"}