Skip to content

Commit 5120124

Browse files
cicnavitvdijen
andauthored
Update translations (#285)
* Start with text message IDs * Update translations * Fix some of the Dutch translations * Add Croatian language * Add es, fr, it langs back as empty translation files --------- Co-authored-by: Tim van Dijen <[email protected]>
1 parent d3cdf5f commit 5120124

File tree

16 files changed

+3244
-572
lines changed

16 files changed

+3244
-572
lines changed

locales/en/LC_MESSAGES/oidc.po

Lines changed: 496 additions & 149 deletions
Large diffs are not rendered by default.

locales/es/LC_MESSAGES/oidc.po

Lines changed: 520 additions & 94 deletions
Large diffs are not rendered by default.

locales/fr/LC_MESSAGES/oidc.po

Lines changed: 508 additions & 134 deletions
Large diffs are not rendered by default.

locales/hr/LC_MESSAGES/oidc.po

Lines changed: 614 additions & 0 deletions
Large diffs are not rendered by default.

locales/it/LC_MESSAGES/oidc.po

Lines changed: 526 additions & 82 deletions
Large diffs are not rendered by default.

locales/nl/LC_MESSAGES/oidc.po

Lines changed: 477 additions & 79 deletions
Large diffs are not rendered by default.

src/Forms/ClientForm.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -353,40 +353,40 @@ protected function buildForm(): void
353353
$this->setMethod('POST');
354354
$this->addComponent($this->csrfProtection, Form::ProtectorId);
355355

356-
$this->addText('name', '{oidc:client:name}')
356+
$this->addText('name', Translate::noop('Name'))
357357
->setHtmlAttribute('class', 'full-width')
358358
->setMaxLength(255)
359359
->setRequired(Translate::noop('Name is required.'));
360360

361-
$this->addTextArea('description', '{oidc:client:description}', null, 3)
361+
$this->addTextArea('description', Translate::noop('Description'), null, 3)
362362
->setHtmlAttribute('class', 'full-width');
363-
$this->addTextArea('redirect_uri', '{oidc:client:redirect_uri}', null, 5)
363+
$this->addTextArea('redirect_uri', Translate::noop('Redirect URI'), null, 5)
364364
->setHtmlAttribute('class', 'full-width')
365365
->setRequired(Translate::noop('At least one redirect URI is required.'));
366366

367-
$this->addCheckbox('is_enabled', '{oidc:client:is_enabled}');
367+
$this->addCheckbox('is_enabled', Translate::noop('Activated'));
368368

369369
$this->addCheckbox('is_confidential', '{oidc:client:is_confidential}');
370370

371-
$this->addSelect('auth_source', '{oidc:client:auth_source}:')
371+
$this->addSelect('auth_source', Translate::noop('Authentication source'))
372372
->setHtmlAttribute('class', 'full-width')
373373
->setItems($this->sspBridge->auth()->source()->getSources(), false)
374374
->setPrompt(Translate::noop('-'));
375375

376376
$scopes = $this->getScopes();
377377

378-
$this->addMultiSelect('scopes', '{oidc:client:scopes}', $scopes, 10)
378+
$this->addMultiSelect('scopes', Translate::noop('Scopes'), $scopes, 10)
379379
->setHtmlAttribute('class', 'full-width')
380380
->setRequired(Translate::noop('At least one scope is required.'));
381381

382-
$this->addText('owner', '{oidc:client:owner}')
382+
$this->addText('owner', Translate::noop('Owner'))
383383
->setMaxLength(190);
384-
$this->addTextArea('post_logout_redirect_uri', '{oidc:client:post_logout_redirect_uri}', null, 5)
384+
$this->addTextArea('post_logout_redirect_uri', Translate::noop('Post-logout Redirect URIs'), null, 5)
385385
->setHtmlAttribute('class', 'full-width');
386-
$this->addTextArea('allowed_origin', '{oidc:client:allowed_origin}', null, 5)
386+
$this->addTextArea('allowed_origin', Translate::noop('Allowed origins for public clients'), null, 5)
387387
->setHtmlAttribute('class', 'full-width');
388388

389-
$this->addText('backchannel_logout_uri', '{oidc:client:backchannel_logout_uri}')
389+
$this->addText('backchannel_logout_uri', Translate::noop('Back-Channel Logout URI'))
390390
->setHtmlAttribute('class', 'full-width');
391391

392392
$this->addText('entity_identifier', 'Entity Identifier')

src/Services/Container.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use SimpleSAML\Configuration;
3131
use SimpleSAML\Database;
3232
use SimpleSAML\Error\Exception;
33+
use SimpleSAML\Locale\Translate;
3334
use SimpleSAML\Metadata\MetaDataStorageHandler;
3435
use SimpleSAML\Module\oidc\Admin\Menu;
3536
use SimpleSAML\Module\oidc\Bridges\PsrHttpBridge;
@@ -147,7 +148,11 @@ public function __construct()
147148
$helpers = new Helpers();
148149
$this->services[Helpers::class] = $helpers;
149150

150-
$csrfProtection = new CsrfProtection('{oidc:client:csrf_error}', $session);
151+
$csrfProtection = new CsrfProtection(
152+
Translate::noop('Your session has expired. Please return to the home page and try again.'),
153+
$session,
154+
);
155+
151156
$formFactory = new FormFactory(
152157
$moduleConfig,
153158
$csrfProtection,

templates/clients.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
<small>{{ client.description }}</small>
5454
<br>
5555
<small>
56-
{{ 'Registration:'|trans }} {{ client.registrationType.description }} |
57-
{{ 'Created at:'|trans }} {{ client.createdAt ? client.createdAt|date() : 'n/a' }} |
58-
{{ 'Updated at:'|trans }} {{ client.updatedAt ? client.updatedAt|date() : 'n/a' }} |
59-
{{ 'Expires at:'|trans }} {{ client.expiresAt ? client.expiresAt|date() : 'never' }}
56+
{{ 'Registration'|trans }}: {{ client.registrationType.description }} |
57+
{{ 'Created at'|trans }}: {{ client.createdAt ? client.createdAt|date() : 'n/a' }} |
58+
{{ 'Updated at'|trans }}: {{ client.updatedAt ? client.updatedAt|date() : 'n/a' }} |
59+
{{ 'Expires at'|trans }}: {{ client.expiresAt ? client.expiresAt|date() : 'never'|trans }}
6060
</small>
6161
</td>
6262
<td>

templates/clients/includes/form.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<span class="pure-form-message red-text">{{ form.scopes.getError }}</span>
8888
{% endif %}
8989

90-
<label for="frm-backchannel_logout_uri">{{ 'Back-Channel Logout URI'|trans }}</label>
90+
<label for="frm-backchannel_logout_uri">{{ 'Back-channel Logout URI'|trans }}</label>
9191
{{ form.backchannel_logout_uri.control | raw }}
9292
<span class="pure-form-message">
9393
{% trans %}Enter if client supports Back-Channel Logout specification. When logout is initiated at the OpenID Provider, it will send a Logout Token to this URI in order to notify the client about that event. Must be a valid URI. Example: https://example.org/foo?bar=1{% endtrans %}
@@ -96,7 +96,7 @@
9696
<span class="pure-form-message red-text">{{ form.backchannel_logout_uri.getError }}</span>
9797
{% endif %}
9898

99-
<label for="frm-post_logout_redirect_uri">{{ 'Post-Logout Redirect URIs'|trans }}</label>
99+
<label for="frm-post_logout_redirect_uri">{{ 'Post-logout Redirect URIs'|trans }}</label>
100100
{{ form.post_logout_redirect_uri.control | raw }}
101101
<span class="pure-form-message">
102102
{% trans %}Allowed redirect URIs to use after client initiated logout. Must be a valid URI, one per line. Example: https://example.org/foo?bar=1{% endtrans %}

0 commit comments

Comments
 (0)