Skip to content

Commit e1760df

Browse files
authored
Add pt-PT translation (#920)
* document how to contribute translations
1 parent b9083eb commit e1760df

File tree

10 files changed

+195
-7
lines changed

10 files changed

+195
-7
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Paul Oswald
2929
Pavel Tvrdík
3030
pySilver
3131
Rodney Richardson
32+
Sandro Rodrigues
3233
Silvano Cerza
3334
Stéphane Raimbault
3435
Jun Zhou

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

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

2223
### Added
2324
* #884 Added support for Python 3.9

docs/contributing.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@ the browser.
7878
* `ReStructuredText primer
7979
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_
8080

81+
Translations
82+
============
83+
84+
You can contribute international language translations using
85+
`django-admin makemessages <https://docs.djangoproject.com/en/dev/ref/django-admin/#makemessages>`_.
86+
87+
For example, to add Deutsch::
88+
89+
cd oauth2_provider
90+
django-admin makemessages --locale de
91+
92+
Then edit ``locale/de/LC_MESSAGES/django.po`` to add your translations.
93+
94+
When deploying your app, don't forget to compile the messages with::
95+
96+
django-admin compilemessages
97+
98+
8199
Pull requests
82100
=============
83101

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
#, fuzzy
2+
msgid ""
3+
msgstr ""
4+
"Project-Id-Version: PACKAGE VERSION\n"
5+
"Report-Msgid-Bugs-To: \n"
6+
"POT-Creation-Date: 2019-01-25 11:45+0000\n"
7+
"PO-Revision-Date: 2019-01-25 11:45+0000\n"
8+
"Last-Translator: Sandro Rodrigues <[email protected]>\n"
9+
"Language-Team: LANGUAGE <[email protected]>\n"
10+
"Language: pt-PT\n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: 8bit\n"
14+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
15+
16+
#: docs/_build/html/_sources/templates.rst.txt:94
17+
#: oauth2_provider/templates/oauth2_provider/authorize.html:8
18+
#: oauth2_provider/templates/oauth2_provider/authorize.html:30
19+
msgid "Authorize"
20+
msgstr "Autorizar"
21+
22+
#: docs/_build/html/_sources/templates.rst.txt:103
23+
#: oauth2_provider/templates/oauth2_provider/authorize.html:17
24+
msgid "Application requires following permissions"
25+
msgstr "A aplicação requer as seguintes permissões"
26+
27+
#: oauth2_provider/models.py:41
28+
msgid "Confidential"
29+
msgstr "Confidencial"
30+
31+
#: oauth2_provider/models.py:42
32+
msgid "Public"
33+
msgstr "Público"
34+
35+
#: oauth2_provider/models.py:50
36+
msgid "Authorization code"
37+
msgstr "Código de autorização"
38+
39+
#: oauth2_provider/models.py:51
40+
msgid "Implicit"
41+
msgstr "Implícito"
42+
43+
#: oauth2_provider/models.py:52
44+
msgid "Resource owner password-based"
45+
msgstr "Palavra-passe do proprietário de dados"
46+
47+
#: oauth2_provider/models.py:53
48+
msgid "Client credentials"
49+
msgstr "Credenciais do cliente"
50+
51+
#: oauth2_provider/models.py:67
52+
msgid "Allowed URIs list, space separated"
53+
msgstr "Lista de URIs permitidos, separados por espaço"
54+
55+
#: oauth2_provider/models.py:143
56+
#, python-brace-format
57+
msgid "Unauthorized redirect scheme: {scheme}"
58+
msgstr "Esquema de redirecionamento não autorizado: {scheme}"
59+
60+
#: oauth2_provider/models.py:148
61+
#, python-brace-format
62+
msgid "redirect_uris cannot be empty with grant_type {grant_type}"
63+
msgstr "redirect_uris não pode estar vazio com o grant_type {grant_type}"
64+
65+
#: oauth2_provider/oauth2_validators.py:166
66+
msgid "The access token is invalid."
67+
msgstr "O token de acesso é inválido."
68+
69+
#: oauth2_provider/oauth2_validators.py:171
70+
msgid "The access token has expired."
71+
msgstr "O token de acesso expirou."
72+
73+
#: oauth2_provider/oauth2_validators.py:176
74+
msgid "The access token is valid but does not have enough scope."
75+
msgstr "O token de acesso é válido, mas não tem permissões suficientes."
76+
77+
#: oauth2_provider/templates/oauth2_provider/application_confirm_delete.html:6
78+
msgid "Are you sure to delete the application"
79+
msgstr "Tem a certeza que pretende apagar a aplicação"
80+
81+
#: oauth2_provider/templates/oauth2_provider/application_confirm_delete.html:12
82+
#: oauth2_provider/templates/oauth2_provider/authorize.html:29
83+
msgid "Cancel"
84+
msgstr "Cancelar"
85+
86+
#: oauth2_provider/templates/oauth2_provider/application_confirm_delete.html:13
87+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:38
88+
#: oauth2_provider/templates/oauth2_provider/authorized-token-delete.html:7
89+
msgid "Delete"
90+
msgstr "Apagar"
91+
92+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:10
93+
msgid "Client id"
94+
msgstr "ID do Cliente"
95+
96+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:15
97+
msgid "Client secret"
98+
msgstr "Segredo do cliente"
99+
100+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:20
101+
msgid "Client type"
102+
msgstr "Tipo de cliente"
103+
104+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:25
105+
msgid "Authorization Grant Type"
106+
msgstr "Tipo de concessão de autorização"
107+
108+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:30
109+
msgid "Redirect Uris"
110+
msgstr "URI's de redirecionamento"
111+
112+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:36
113+
#: oauth2_provider/templates/oauth2_provider/application_form.html:35
114+
msgid "Go Back"
115+
msgstr "Voltar"
116+
117+
#: oauth2_provider/templates/oauth2_provider/application_detail.html:37
118+
msgid "Edit"
119+
msgstr "Editar"
120+
121+
#: oauth2_provider/templates/oauth2_provider/application_form.html:9
122+
msgid "Edit application"
123+
msgstr "Editar aplicação"
124+
125+
#: oauth2_provider/templates/oauth2_provider/application_form.html:37
126+
msgid "Save"
127+
msgstr "Guardar"
128+
129+
#: oauth2_provider/templates/oauth2_provider/application_list.html:6
130+
msgid "Your applications"
131+
msgstr "As tuas aplicações"
132+
133+
#: oauth2_provider/templates/oauth2_provider/application_list.html:14
134+
msgid "New Application"
135+
msgstr "Nova Aplicação"
136+
137+
#: oauth2_provider/templates/oauth2_provider/application_list.html:17
138+
msgid "No applications defined"
139+
msgstr "Sem aplicações definidas"
140+
141+
#: oauth2_provider/templates/oauth2_provider/application_list.html:17
142+
msgid "Click here"
143+
msgstr "Clica aqui"
144+
145+
#: oauth2_provider/templates/oauth2_provider/application_list.html:17
146+
msgid "if you want to register a new one"
147+
msgstr "se pretender registar uma nova"
148+
149+
#: oauth2_provider/templates/oauth2_provider/application_registration_form.html:5
150+
msgid "Register a new application"
151+
msgstr "Registar nova aplicação"
152+
153+
#: oauth2_provider/templates/oauth2_provider/authorized-token-delete.html:6
154+
msgid "Are you sure you want to delete this token?"
155+
msgstr "Tem a certeza que pretende apagar o token?"
156+
157+
#: oauth2_provider/templates/oauth2_provider/authorized-tokens.html:6
158+
msgid "Tokens"
159+
msgstr "Tokens"
160+
161+
#: oauth2_provider/templates/oauth2_provider/authorized-tokens.html:11
162+
msgid "revoke"
163+
msgstr "revogar"
164+
165+
#: oauth2_provider/templates/oauth2_provider/authorized-tokens.html:19
166+
msgid "There are no authorized tokens yet."
167+
msgstr "De momento, não tem tokens autorizados."

oauth2_provider/templates/oauth2_provider/application_confirm_delete.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h3 class="block-center-heading">{% trans "Are you sure to delete the applicatio
1010
<div class="control-group">
1111
<div class="controls">
1212
<a class="btn btn-large" href="{% url "oauth2_provider:list" %}">{% trans "Cancel" %}</a>
13-
<input type="submit" class="btn btn-large btn-danger" name="allow" value="{% trans "Delete" %}"/>
13+
<input type="submit" class="btn btn-large btn-danger" name="allow" value="{% trans 'Delete' %}"/>
1414
</div>
1515
</div>
1616
</form>

oauth2_provider/templates/oauth2_provider/application_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h3 class="block-center-heading">
3434
<a class="btn" href="{% block app-form-back-url %}{% url "oauth2_provider:detail" application.id %}{% endblock app-form-back-url %}">
3535
{% trans "Go Back" %}
3636
</a>
37-
<button type="submit" class="btn btn-primary">Save</button>
37+
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
3838
</div>
3939
</div>
4040
</form>

oauth2_provider/templates/oauth2_provider/application_list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ <h3 class="block-center-heading">{% trans "Your applications" %}</h3>
1111
{% endfor %}
1212
</ul>
1313

14-
<a class="btn btn-success" href="{% url "oauth2_provider:register" %}">New Application</a>
14+
<a class="btn btn-success" href="{% url "oauth2_provider:register" %}">{% trans "New Application" %}</a>
1515
{% else %}
16+
1617
<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>
1718
{% endif %}
1819
</div>

oauth2_provider/templates/oauth2_provider/authorize.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ <h3 class="block-center-heading">{% trans "Authorize" %} {{ application.name }}?
2626

2727
<div class="control-group">
2828
<div class="controls">
29-
<input type="submit" class="btn btn-large" value="Cancel"/>
30-
<input type="submit" class="btn btn-large btn-primary" name="allow" value="Authorize"/>
29+
<input type="submit" class="btn btn-large" value="{% trans 'Cancel' %}"/>
30+
<input type="submit" class="btn btn-large btn-primary" name="allow" value="{% trans 'Authorize' %}"/>
3131
</div>
3232
</div>
3333
</form>

oauth2_provider/templates/oauth2_provider/authorized-token-delete.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
{% block content %}
55
<form action="" method="post">{% csrf_token %}
66
<p>{% trans "Are you sure you want to delete this token?" %}</p>
7-
<input type="submit" value="{% trans "Delete" %}" />
7+
<input type="submit" value="{% trans 'Delete' %}" />
88
</form>
99
{% endblock %}

oauth2_provider/templates/oauth2_provider/authorized-tokens.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1>{% trans "Tokens" %}</h1>
88
{% for authorized_token in authorized_tokens %}
99
<li>
1010
{{ authorized_token.application }}
11-
(<a href="{% url 'oauth2_provider:authorized-token-delete' authorized_token.pk %}">revoke</a>)
11+
(<a href="{% url 'oauth2_provider:authorized-token-delete' authorized_token.pk %}">{% trans "revoke" %}</a>)
1212
</li>
1313
<ul>
1414
{% for scope_name, scope_description in authorized_token.scopes.items %}

0 commit comments

Comments
 (0)