mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-03-17 05:40:26 +00:00
Removed a few references to microsofttranslator and fixed the translation path
This commit is contained in:
parent
8c7efe32df
commit
3b3d63eecd
5 changed files with 4 additions and 5 deletions
|
|
@ -13,4 +13,4 @@ recursive-include testproject *
|
|||
recursive-include docs *
|
||||
prune rosetta/tests/__pycache__
|
||||
prune rosetta/utils/__pycache__
|
||||
prune rosetta/utils/microsofttranslator/__pycache__
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Rosetta can be configured via the following parameters, to be defined in your pr
|
|||
* ``ROSETTA_MESSAGES_PER_PAGE``: Number of messages to display per page. Defaults to ``10``.
|
||||
* ``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_ID`` and ``AZURE_CLIENT_SECRET``: Translation suggestions using the Microsoft Azure API. To use this service, you must first `register for the service <https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44>`_, then specify the 'Customer ID' and 'Primary Account Key' respectively, which you can find on your `account information page on Azure Marketplace <https://datamarket.azure.com/account?lang=en>`_.
|
||||
* ``AZURE_CLIENT_SECRET``: Translation suggestions using the Microsoft Azure API. To use this service, you must first `register for the service <https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44>`_, then specify the 'Customer ID' and 'Primary Account Key' respectively, which you can find on your `account information page on Azure Marketplace <https://datamarket.azure.com/account?lang=en>`_.
|
||||
* ``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``.
|
||||
* ``ROSETTA_EXCLUDED_APPLICATIONS``: Exclude applications defined in this list from being translated. Defaults to ``()``.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ google.setOnLoadCallback(function() {
|
|||
orig = unescape(orig).replace(/<br\s?\/?>/g,'\n').replace(/<code>/,'').replace(/<\/code>/g,'').replace(/>/g,'>').replace(/</g,'<');
|
||||
a.attr('class','suggesting').html('...');
|
||||
|
||||
$.getJSON("./translate/", {
|
||||
$.getJSON("{% url 'rosetta.translate_text' %}", {
|
||||
from: sourceLang,
|
||||
to: destLang,
|
||||
text: orig
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ urlpatterns = [
|
|||
|
||||
url(r'^translate/$',
|
||||
views.translate_text,
|
||||
name='translate_text',
|
||||
name='rosetta.translate_text',
|
||||
),
|
||||
]
|
||||
|
|
|
|||
1
tox.ini
1
tox.ini
|
|
@ -29,7 +29,6 @@ deps =
|
|||
# py27-django18: pudb
|
||||
requests
|
||||
polib>=1.1.0
|
||||
microsofttranslator>=0.7
|
||||
six
|
||||
goslate
|
||||
vcrpy
|
||||
|
|
|
|||
Loading…
Reference in a new issue