Skip to content

Commit fe280a3

Browse files
committed
Use localized strings for the OpenID Connect texts.
1 parent 878e164 commit fe280a3

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
@@ -10,7 +10,7 @@
1010
<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>
1111
<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>
1212
<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>
13-
<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>
13+
<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>
1414
</ul>
1515
<div class="tab-content">
1616

@@ -187,25 +187,25 @@
187187
<label class="custom-switch">
188188
<input type="checkbox" class="custom-switch-input" name="openidc_enabled" value="1"<%- openidc_enabled ? ' checked' : '' %>>
189189
<span class="custom-switch-indicator"></span>
190-
<span class="custom-switch-description">Use OpenID Connect authentication</span>
190+
<span class="custom-switch-description"><%- i18n('proxy-hosts', 'oidc-enabled') %></span>
191191
</label>
192192
</div>
193193
</div>
194194
<div class="col-sm-12 col-md-12 openidc">
195195
<div class="form-group">
196-
<label class="form-label">Redirect URI<span class="form-required">*</span></label>
196+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-redirect-uri') %><span class="form-required">*</span></label>
197197
<input type="text" name="openidc_redirect_uri" class="form-control text-monospace" placeholder="" value="<%- openidc_redirect_uri %>" autocomplete="off" maxlength="255" required>
198198
</div>
199199
</div>
200200
<div class="col-sm-12 col-md-12 openidc">
201201
<div class="form-group">
202-
<label class="form-label">Well-known discovery endpoint<span class="form-required">*</span></label>
202+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-discovery-endpoint') %><span class="form-required">*</span></label>
203203
<input type="text" name="openidc_discovery" class="form-control text-monospace" placeholder="" value="<%- openidc_discovery %>" autocomplete="off" maxlength="255" required>
204204
</div>
205205
</div>
206206
<div class="col-sm-12 col-md-12 openidc">
207207
<div class="form-group">
208-
<label class="form-label">Token endpoint auth method<span class="form-required">*</span></label>
208+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-token-auth-method') %><span class="form-required">*</span></label>
209209
<select name="openidc_auth_method" class="form-control custom-select" placeholder="client_secret_post">
210210
<option value="client_secret_post" <%- openidc_auth_method === 'client_secret_post' ? 'selected' : '' %>>client_secret_post</option>
211211
<option value="client_secret_basic" <%- openidc_auth_method === 'client_secret_basic' ? 'selected' : '' %>>client_secret_basic</option>
@@ -214,13 +214,13 @@
214214
</div>
215215
<div class="col-sm-12 col-md-12 openidc">
216216
<div class="form-group">
217-
<label class="form-label">Client ID<span class="form-required">*</span></label>
217+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-client-id') %><span class="form-required">*</span></label>
218218
<input type="text" name="openidc_client_id" class="form-control text-monospace" placeholder="" value="<%- openidc_client_id %>" autocomplete="off" maxlength="255" required>
219219
</div>
220220
</div>
221221
<div class="col-sm-12 col-md-12 openidc">
222222
<div class="form-group">
223-
<label class="form-label">Client secret<span class="form-required">*</span></label>
223+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-client-secret') %><span class="form-required">*</span></label>
224224
<input type="text" name="openidc_client_secret" class="form-control text-monospace" placeholder="" value="<%- openidc_client_secret %>" autocomplete="off" maxlength="255" required>
225225
</div>
226226
</div>
@@ -230,13 +230,13 @@
230230
<label class="custom-switch">
231231
<input type="checkbox" class="custom-switch-input" name="openidc_restrict_users_enabled" value="1"<%- openidc_restrict_users_enabled ? ' checked' : '' %>>
232232
<span class="custom-switch-indicator"></span>
233-
<span class="custom-switch-description">Allow only these user emails</span>
233+
<span class="custom-switch-description"><%- i18n('proxy-hosts', 'oidc-allow-only-emails') %></span>
234234
</label>
235235
</div>
236236
</div>
237237
<div class="col-sm-12 col-md-12 openidc_users">
238238
<div class="form-group">
239-
<label class="form-label">Allowed email addresses<span class="form-required">*</span></label>
239+
<label class="form-label"><%- i18n('proxy-hosts', 'oidc-allowed-emails') %><span class="form-required">*</span></label>
240240
<input type="text" name="openidc_allowed_users" class="form-control" id="openidc_allowed_users" value="<%- openidc_allowed_users.join(',') %>" required>
241241
</div>
242242
</div>

frontend/js/i18n/messages.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@
118118
"access-list": "Access List",
119119
"allow-websocket-upgrade": "Websockets Support",
120120
"ignore-invalid-upstream-ssl": "Ignore Invalid SSL",
121-
"custom-forward-host-help": "Use 1.1.1.1/path for sub-folder forwarding"
121+
"custom-forward-host-help": "Use 1.1.1.1/path for sub-folder forwarding",
122+
"oidc": "OpenID Connect",
123+
"oidc-enabled": "Use OpenID Connect authentication",
124+
"oidc-redirect-uri": "Redirect URI",
125+
"oidc-discovery-endpoint": "Well-known discovery endpoint",
126+
"oidc-token-auth-method": "Token endpoint auth method",
127+
"oidc-client-id": "Client ID",
128+
"oidc-client-secret": "Client secret",
129+
"oidc-allow-only-emails": "Allow only these user emails",
130+
"oidc-allowed-emails": "Allowed email addresses"
122131
},
123132
"redirection-hosts": {
124133
"title": "Redirection Hosts",

0 commit comments

Comments
 (0)