Skip to content

Commit 076d89b

Browse files
Subvjc21
authored andcommitted
Use localized strings for the OpenID Connect texts.
1 parent 8539930 commit 076d89b

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

frontend/js/app/nginx/proxy/form.ejs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<li role="presentation" class="nav-item"><a href="#locations" aria-controls="tab4" role="tab" data-toggle="tab" class="nav-link"><i class="fe fe-layers"></i> <%- i18n('all-hosts', 'locations') %></a></li>
1212
<li role="presentation" class="nav-item"><a href="#ssl-options" aria-controls="tab2" role="tab" data-toggle="tab" class="nav-link"><i class="fe fe-shield"></i> <%- i18n('str', 'ssl') %></a></li>
1313
<li role="presentation" class="nav-item"><a href="#advanced" aria-controls="tab3" role="tab" data-toggle="tab" class="nav-link"><i class="fe fe-settings"></i> <%- i18n('all-hosts', 'advanced') %></a></li>
14-
<li role="presentation" class="nav-item"><a href="#openidc" aria-controls="tab3" role="tab" data-toggle="tab" class="nav-link"><i class="fe fe-settings"></i>OpenID Connect</a></li>
14+
<li role="presentation" class="nav-item"><a href="#openidc" aria-controls="tab3" role="tab" data-toggle="tab" class="nav-link"><i class="fe fe-settings"></i><%- i18n('proxy-hosts', 'oidc') %></a></li>
1515
</ul>
1616
<div class="tab-content">
1717

@@ -280,25 +280,25 @@
280280
<label class="custom-switch">
281281
<input type="checkbox" class="custom-switch-input" name="openidc_enabled" value="1"<%- openidc_enabled ? ' checked' : '' %>>
282282
<span class="custom-switch-indicator"></span>
283-
<span class="custom-switch-description">Use OpenID Connect authentication</span>
283+
<span class="custom-switch-description"><%- i18n('proxy-hosts', 'oidc-enabled') %></span>
284284
</label>
285285
</div>
286286
</div>
287287
<div class="col-sm-12 col-md-12 openidc">
288288
<div class="form-group">
289-
<label class="form-label">Redirect URI<span class="form-required">*</span></label>
289+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-redirect-uri') %><span class="form-required">*</span></label>
290290
<input type="text" name="openidc_redirect_uri" class="form-control text-monospace" placeholder="" value="<%- openidc_redirect_uri %>" autocomplete="off" maxlength="255" required>
291291
</div>
292292
</div>
293293
<div class="col-sm-12 col-md-12 openidc">
294294
<div class="form-group">
295-
<label class="form-label">Well-known discovery endpoint<span class="form-required">*</span></label>
295+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-discovery-endpoint') %><span class="form-required">*</span></label>
296296
<input type="text" name="openidc_discovery" class="form-control text-monospace" placeholder="" value="<%- openidc_discovery %>" autocomplete="off" maxlength="255" required>
297297
</div>
298298
</div>
299299
<div class="col-sm-12 col-md-12 openidc">
300300
<div class="form-group">
301-
<label class="form-label">Token endpoint auth method<span class="form-required">*</span></label>
301+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-token-auth-method') %><span class="form-required">*</span></label>
302302
<select name="openidc_auth_method" class="form-control custom-select" placeholder="client_secret_post">
303303
<option value="client_secret_post" <%- openidc_auth_method === 'client_secret_post' ? 'selected' : '' %>>client_secret_post</option>
304304
<option value="client_secret_basic" <%- openidc_auth_method === 'client_secret_basic' ? 'selected' : '' %>>client_secret_basic</option>
@@ -307,13 +307,13 @@
307307
</div>
308308
<div class="col-sm-12 col-md-12 openidc">
309309
<div class="form-group">
310-
<label class="form-label">Client ID<span class="form-required">*</span></label>
310+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-client-id') %><span class="form-required">*</span></label>
311311
<input type="text" name="openidc_client_id" class="form-control text-monospace" placeholder="" value="<%- openidc_client_id %>" autocomplete="off" maxlength="255" required>
312312
</div>
313313
</div>
314314
<div class="col-sm-12 col-md-12 openidc">
315315
<div class="form-group">
316-
<label class="form-label">Client secret<span class="form-required">*</span></label>
316+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-client-secret') %><span class="form-required">*</span></label>
317317
<input type="text" name="openidc_client_secret" class="form-control text-monospace" placeholder="" value="<%- openidc_client_secret %>" autocomplete="off" maxlength="255" required>
318318
</div>
319319
</div>
@@ -323,13 +323,13 @@
323323
<label class="custom-switch">
324324
<input type="checkbox" class="custom-switch-input" name="openidc_restrict_users_enabled" value="1"<%- openidc_restrict_users_enabled ? ' checked' : '' %>>
325325
<span class="custom-switch-indicator"></span>
326-
<span class="custom-switch-description">Allow only these user emails</span>
326+
<span class="custom-switch-description"><%- i18n('proxy-hosts', 'oidc-allow-only-emails') %></span>
327327
</label>
328328
</div>
329329
</div>
330330
<div class="col-sm-12 col-md-12 openidc_users">
331331
<div class="form-group">
332-
<label class="form-label">Allowed email addresses<span class="form-required">*</span></label>
332+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-allowed-emails') %><span class="form-required">*</span></label>
333333
<input type="text" name="openidc_allowed_users" class="form-control" id="openidc_allowed_users" value="<%- openidc_allowed_users.join(',') %>" required>
334334
</div>
335335
</div>

frontend/js/i18n/messages.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,16 @@
130130
"access-list": "Access List",
131131
"allow-websocket-upgrade": "Websockets Support",
132132
"ignore-invalid-upstream-ssl": "Ignore Invalid SSL",
133-
"custom-forward-host-help": "Use 1.1.1.1/path for sub-folder forwarding"
133+
"custom-forward-host-help": "Use 1.1.1.1/path for sub-folder forwarding",
134+
"oidc": "OpenID Connect",
135+
"oidc-enabled": "Use OpenID Connect authentication",
136+
"oidc-redirect-uri": "Redirect URI",
137+
"oidc-discovery-endpoint": "Well-known discovery endpoint",
138+
"oidc-token-auth-method": "Token endpoint auth method",
139+
"oidc-client-id": "Client ID",
140+
"oidc-client-secret": "Client secret",
141+
"oidc-allow-only-emails": "Allow only these user emails",
142+
"oidc-allowed-emails": "Allowed email addresses"
134143
},
135144
"redirection-hosts": {
136145
"title": "Redirection Hosts",

0 commit comments

Comments
 (0)