Skip to content

3rd try at getting pt-PT PR #690 to merge #920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Paul Oswald
Pavel Tvrdík
pySilver
Rodney Richardson
Sandro Rodrigues
Silvano Cerza
Stéphane Raimbault
Jun Zhou
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* #898 Added the ability to customize classes for django admin
* #903 Disable `redirect_uri` field length limit for `AbstractGrant`
* #690 Added pt-PT translations to HTML templates. This enables adding additional translations.

### Added
* #884 Added support for Python 3.9
Expand Down
18 changes: 18 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ the browser.
* `ReStructuredText primer
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_

Translations
============

You can contribute international language translations using
`django-admin makemessages <https://docs.djangoproject.com/en/dev/ref/django-admin/#makemessages>`_.

For example, to add Deutsch::

cd oauth2_provider
django-admin makemessages --locale de

Then edit ``locale/de/LC_MESSAGES/django.po`` to add your translations.

When deploying your app, don't forget to compile the messages with::

django-admin compilemessages


Pull requests
=============

Expand Down
167 changes: 167 additions & 0 deletions oauth2_provider/locale/pt/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-25 11:45+0000\n"
"PO-Revision-Date: 2019-01-25 11:45+0000\n"
"Last-Translator: Sandro Rodrigues <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: pt-PT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: docs/_build/html/_sources/templates.rst.txt:94
#: oauth2_provider/templates/oauth2_provider/authorize.html:8
#: oauth2_provider/templates/oauth2_provider/authorize.html:30
msgid "Authorize"
msgstr "Autorizar"

#: docs/_build/html/_sources/templates.rst.txt:103
#: oauth2_provider/templates/oauth2_provider/authorize.html:17
msgid "Application requires following permissions"
msgstr "A aplicação requer as seguintes permissões"

#: oauth2_provider/models.py:41
msgid "Confidential"
msgstr "Confidencial"

#: oauth2_provider/models.py:42
msgid "Public"
msgstr "Público"

#: oauth2_provider/models.py:50
msgid "Authorization code"
msgstr "Código de autorização"

#: oauth2_provider/models.py:51
msgid "Implicit"
msgstr "Implícito"

#: oauth2_provider/models.py:52
msgid "Resource owner password-based"
msgstr "Palavra-passe do proprietário de dados"

#: oauth2_provider/models.py:53
msgid "Client credentials"
msgstr "Credenciais do cliente"

#: oauth2_provider/models.py:67
msgid "Allowed URIs list, space separated"
msgstr "Lista de URIs permitidos, separados por espaço"

#: oauth2_provider/models.py:143
#, python-brace-format
msgid "Unauthorized redirect scheme: {scheme}"
msgstr "Esquema de redirecionamento não autorizado: {scheme}"

#: oauth2_provider/models.py:148
#, python-brace-format
msgid "redirect_uris cannot be empty with grant_type {grant_type}"
msgstr "redirect_uris não pode estar vazio com o grant_type {grant_type}"

#: oauth2_provider/oauth2_validators.py:166
msgid "The access token is invalid."
msgstr "O token de acesso é inválido."

#: oauth2_provider/oauth2_validators.py:171
msgid "The access token has expired."
msgstr "O token de acesso expirou."

#: oauth2_provider/oauth2_validators.py:176
msgid "The access token is valid but does not have enough scope."
msgstr "O token de acesso é válido, mas não tem permissões suficientes."

#: oauth2_provider/templates/oauth2_provider/application_confirm_delete.html:6
msgid "Are you sure to delete the application"
msgstr "Tem a certeza que pretende apagar a aplicação"

#: oauth2_provider/templates/oauth2_provider/application_confirm_delete.html:12
#: oauth2_provider/templates/oauth2_provider/authorize.html:29
msgid "Cancel"
msgstr "Cancelar"

#: oauth2_provider/templates/oauth2_provider/application_confirm_delete.html:13
#: oauth2_provider/templates/oauth2_provider/application_detail.html:38
#: oauth2_provider/templates/oauth2_provider/authorized-token-delete.html:7
msgid "Delete"
msgstr "Apagar"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:10
msgid "Client id"
msgstr "ID do Cliente"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:15
msgid "Client secret"
msgstr "Segredo do cliente"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:20
msgid "Client type"
msgstr "Tipo de cliente"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:25
msgid "Authorization Grant Type"
msgstr "Tipo de concessão de autorização"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:30
msgid "Redirect Uris"
msgstr "URI's de redirecionamento"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:36
#: oauth2_provider/templates/oauth2_provider/application_form.html:35
msgid "Go Back"
msgstr "Voltar"

#: oauth2_provider/templates/oauth2_provider/application_detail.html:37
msgid "Edit"
msgstr "Editar"

#: oauth2_provider/templates/oauth2_provider/application_form.html:9
msgid "Edit application"
msgstr "Editar aplicação"

#: oauth2_provider/templates/oauth2_provider/application_form.html:37
msgid "Save"
msgstr "Guardar"

#: oauth2_provider/templates/oauth2_provider/application_list.html:6
msgid "Your applications"
msgstr "As tuas aplicações"

#: oauth2_provider/templates/oauth2_provider/application_list.html:14
msgid "New Application"
msgstr "Nova Aplicação"

#: oauth2_provider/templates/oauth2_provider/application_list.html:17
msgid "No applications defined"
msgstr "Sem aplicações definidas"

#: oauth2_provider/templates/oauth2_provider/application_list.html:17
msgid "Click here"
msgstr "Clica aqui"

#: oauth2_provider/templates/oauth2_provider/application_list.html:17
msgid "if you want to register a new one"
msgstr "se pretender registar uma nova"

#: oauth2_provider/templates/oauth2_provider/application_registration_form.html:5
msgid "Register a new application"
msgstr "Registar nova aplicação"

#: oauth2_provider/templates/oauth2_provider/authorized-token-delete.html:6
msgid "Are you sure you want to delete this token?"
msgstr "Tem a certeza que pretende apagar o token?"

#: oauth2_provider/templates/oauth2_provider/authorized-tokens.html:6
msgid "Tokens"
msgstr "Tokens"

#: oauth2_provider/templates/oauth2_provider/authorized-tokens.html:11
msgid "revoke"
msgstr "revogar"

#: oauth2_provider/templates/oauth2_provider/authorized-tokens.html:19
msgid "There are no authorized tokens yet."
msgstr "De momento, não tem tokens autorizados."
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3 class="block-center-heading">{% trans "Are you sure to delete the applicatio
<div class="control-group">
<div class="controls">
<a class="btn btn-large" href="{% url "oauth2_provider:list" %}">{% trans "Cancel" %}</a>
<input type="submit" class="btn btn-large btn-danger" name="allow" value="{% trans "Delete" %}"/>
<input type="submit" class="btn btn-large btn-danger" name="allow" value="{% trans 'Delete' %}"/>
</div>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3 class="block-center-heading">
<a class="btn" href="{% block app-form-back-url %}{% url "oauth2_provider:detail" application.id %}{% endblock app-form-back-url %}">
{% trans "Go Back" %}
</a>
<button type="submit" class="btn btn-primary">Save</button>
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
</div>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ <h3 class="block-center-heading">{% trans "Your applications" %}</h3>
{% endfor %}
</ul>

<a class="btn btn-success" href="{% url "oauth2_provider:register" %}">New Application</a>
<a class="btn btn-success" href="{% url "oauth2_provider:register" %}">{% trans "New Application" %}</a>
{% else %}

<p>{% trans "No applications defined" %}. <a href="{% url 'oauth2_provider:register' %}">{% trans "Click here" %}</a> {% trans "if you want to register a new one" %}</p>
{% endif %}
</div>
Expand Down
4 changes: 2 additions & 2 deletions oauth2_provider/templates/oauth2_provider/authorize.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h3 class="block-center-heading">{% trans "Authorize" %} {{ application.name }}?

<div class="control-group">
<div class="controls">
<input type="submit" class="btn btn-large" value="Cancel"/>
<input type="submit" class="btn btn-large btn-primary" name="allow" value="Authorize"/>
<input type="submit" class="btn btn-large" value="{% trans 'Cancel' %}"/>
<input type="submit" class="btn btn-large btn-primary" name="allow" value="{% trans 'Authorize' %}"/>
</div>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
{% block content %}
<form action="" method="post">{% csrf_token %}
<p>{% trans "Are you sure you want to delete this token?" %}</p>
<input type="submit" value="{% trans "Delete" %}" />
<input type="submit" value="{% trans 'Delete' %}" />
</form>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>{% trans "Tokens" %}</h1>
{% for authorized_token in authorized_tokens %}
<li>
{{ authorized_token.application }}
(<a href="{% url 'oauth2_provider:authorized-token-delete' authorized_token.pk %}">revoke</a>)
(<a href="{% url 'oauth2_provider:authorized-token-delete' authorized_token.pk %}">{% trans "revoke" %}</a>)
</li>
<ul>
{% for scope_name, scope_description in authorized_token.scopes.items %}
Expand Down