mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-03-16 21:30:24 +00:00
docs and settings / revert translation in po file back to actual state
This commit is contained in:
parent
0b9dfbce98
commit
84c2ec8b77
3 changed files with 5 additions and 3 deletions
|
|
@ -7,6 +7,8 @@ Rosetta can be configured via the following parameters, to be defined in your pr
|
|||
* ``ROSETTA_ENABLE_TRANSLATION_SUGGESTIONS``: Enable AJAX translation suggestions. Defaults to ``False``.
|
||||
* ``YANDEX_TRANSLATE_KEY``: Translation suggestions from Yandex `Yandex.Translate API <http://api.yandex.com/translate/>`_. To use this service you must first `obtain an AppID key <http://api.yandex.com/key/form.xml?service=trnsl>`_, then specify the key here. Defaults to ``None``.
|
||||
* ``AZURE_CLIENT_SECRET``: Translation suggestions using the Microsoft Azure Translator API. To use this service, you must first `register for the service <https://docs.microsoft.com/en-us/azure/cognitive-services/Translator/translator-text-how-to-signup>`_, and set ``AZURE_CLIENT_SECRET`` to either of the keys listed for your subscription. Defaults to ``None``.
|
||||
* ``DEEPL_AUTH_KEY``: Translation suggestions using the DeepL Translation API. To use this service, you must first `register for DeepL API <https://www.deepl.com/pro#developer>`_, and set ``DEEPL_AUTH_KEY`` to either of the keys listed for your subscription. Defaults to ``None``.
|
||||
* ``DEEPL_LANGUAGES``: A dictionary to convert django language codes to DeepL API Language codes. {"zh_Hans": "ZH"} for Chinese for example. Please check supported languages at `DeepL API docs <https://www.deepl.com/docs-api/>`_. Even if this is not set, Rosetta will try to get the language looking at the first 2 letters of django language code, but it would be useful if you want to specify EN-GB or EN-US for example.
|
||||
* ``GOOGLE_APPLICATION_CREDENTIALS_PATH`` and ``GOOGLE_PROJECT_ID``: Translation suggestions using Google Translation API. To use this service, you must first `register the project <https://cloud.google.com/translate/docs/quickstart-client-libraries-v3>`_. You do not have to register ENV variable. GOOGLE_APPLICATION_CREDENTIALS_PATH is path to JSON credentials file. Defaults to ``None``. You also have to install google-cloud-translate package `pip install google-cloud-translate==3.0.2`
|
||||
* ``ROSETTA_MESSAGES_SOURCE_LANGUAGE_CODE`` and ``ROSETTA_MESSAGES_SOURCE_LANGUAGE_NAME``: Change these if the source language in your PO files isn't English. Default to ``'en'`` and ``'English'`` respectively.
|
||||
* ``ROSETTA_WSGI_AUTO_RELOAD`` and ``ROSETTA_UWSGI_AUTO_RELOAD``: When running WSGI daemon mode, using ``mod_wsgi`` 2.0c5 or later, this setting controls whether the contents of the gettext catalog files should be automatically reloaded by the WSGI processes each time they are modified. For performance reasons, this setting should be disabled in production environments. Default to ``False``.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ msgstr ""
|
|||
#: templates/test.html:3
|
||||
#, fuzzy
|
||||
msgid "Some text to translate"
|
||||
msgstr "Du texte à traduire"
|
||||
msgstr "Crunchum ipsum dolor sit coder void, constructor function"
|
||||
|
||||
#: templates/test.html:5
|
||||
#, python-format
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ ROSETTA_SHOW_AT_ADMIN_PANEL = True
|
|||
# fixtures/vcr_cassettes/test_47_azure_ajax_translation.yaml
|
||||
AZURE_CLIENT_SECRET = None # "FAKE"
|
||||
|
||||
DEEPL_AUTH_KEY = "409de4f4-cfd0-d1f3-c1d5-9fab3ff84a13"
|
||||
DEEPL_AUTH_KEY = None
|
||||
|
||||
|
||||
# Deepl API language codes are different then those of django, so if this is not set according to your desired languages,
|
||||
|
|
@ -137,4 +137,4 @@ DEEPL_AUTH_KEY = "409de4f4-cfd0-d1f3-c1d5-9fab3ff84a13"
|
|||
# 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"}
|
||||
DEEPL_LANGUAGES = None # ex: {"fr": "FR", "en": "EN-GB", "zh_Hans": "ZH"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue