diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/client.js b/openid-connect-server-webapp/src/main/webapp/resources/js/client.js index af1a2e9b5..748002497 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/client.js +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/client.js @@ -261,7 +261,7 @@ var ClientView = Backbone.View.extend({ showRegistrationToken:function(e) { e.preventDefault(); - $('#modalAlertLabel').html('Registration Access Token'); + $('#modalAlertLabel').html($.t('client.client-form.registration-access-token')); var token = new RegistrationTokenModel({clientId: this.model.get('clientId')}); @@ -275,14 +275,14 @@ var ClientView = Backbone.View.extend({ $('#modalAlert .modal-body').html(_self.registrationTokenTemplate(savedModel)); $('#modalAlert .modal-body #rotate-token').click(function(e) { - if (confirm("Are you sure you want to rotate this client's registration token?")) { + if (confirm($.t('client.client-form.rotate-registration-token-confirm'))) { token.save(null, {success: function() { console.log('token:' + token.get('value')); $('#modalAlert .modal-body #registrationToken').val(token.get('value')); }, error: function() { - $('#modalAlert .modal-body').html('There was a problem rotating the registration access token for this client.'); - + $('#modalAlert').i18n(); + $('#modalAlert .modal-body').html($t('client.client-form.rotate-registration-token-error')); $('#modalAlert').modal({ 'backdrop': 'static', 'keyboard': true, @@ -293,6 +293,7 @@ var ClientView = Backbone.View.extend({ } }); + $('#modalAlert').i18n(); $('#modalAlert').modal({ 'backdrop': 'static', 'keyboard': true, @@ -301,8 +302,8 @@ var ClientView = Backbone.View.extend({ }, error:function() { - $('#modalAlert .modal-body').html('There was a problem loading the registration access token for this client.'); - + $('#modalAlert').i18n(); + $('#modalAlert .modal-body').html($t('client.client-form.registration-token-error')); $('#modalAlert').modal({ 'backdrop': 'static', 'keyboard': true, @@ -944,7 +945,7 @@ var ClientFormView = Backbone.View.extend({ this.model.save(attrs, { success:function () { - $('#modalAlertLabel').html('Client Saved'); + $('#modalAlertLabel').html($.t('client.client-form.saved.saved')); var savedModel = { clientId: _self.model.get('clientId'), @@ -962,6 +963,7 @@ var ClientFormView = Backbone.View.extend({ $('#savedClientSecret').show(); }); + $('#modalAlert').i18n(); $('#modalAlert').modal({ 'backdrop': 'static', 'keyboard': true, diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json b/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json index 6905e3ed2..180dd382e 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json @@ -65,6 +65,7 @@ "home": "Home Page", "home-help": "URL for the client's home page, will be displayed to the user", "hours": "hours", + "id": "ID:", "id-token-crypto-algorithm": "ID Token Encryption Algorithm", "id-token-crypto-method": "ID Token Encryption Method", "id-token-signing-algorithm": "ID Token Signing Algorithm", @@ -98,11 +99,24 @@ "refresh-tokens-reused": "Refresh tokens for this client are re-used", "refresh-tokens-no-expire": "Refresh tokens do not time out", "registered": "Registered at", + "registration-token": "Registration Token:", + "registration-access-token": "Registration Access Token", + "registration-token-error": "There was a problem loading the registration access token for this client.", "request-object-signing-algorithm": "Request Object Signing Algorithm", "request-uri": "Request URIs", "require-auth-time": "Require Authentication Time", "require-auth-time-label": "Always require that the auth_time claim be sent in the id token", "response-types": "Response Types", + "rotate-registration-token": "Rotate registration token", + "rotate-registration-token-confirm": "Are you sure you want to rotate this client's registration token?", + "rotate-registration-token-error": "There was a problem rotating the registration access token for this client.", + "saved": { + "no-secret": "No client secret", + "saved": "Client Saved", + "secret": "Secret:", + "show-secret": "Show Secret", + "unchanged": "unchanged" + }, "seconds": "seconds", "secret-asymmetric-jwt": "Asymmetrically-signed JWT assertion", "secret-http": "Client Secret over HTTP Basic", diff --git a/openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json b/openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json index 89ede99c4..2e8646099 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json +++ b/openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json @@ -66,6 +66,7 @@ "home": "Hemsida", "home-help": "Länk till tjänstens hemsida. Den kommer att visas på bekräftelsesidan.", "hours": "timmar", + "id": "ID:", "id-token-crypto-algorithm": "Krypteringsalgoritm för ID-token", "id-token-crypto-method": "Krypteringsmetod för ID-token", "id-token-signing-algorithm": "Signeringsalgoritm för ID-token", @@ -98,11 +99,24 @@ "refresh-tokens-reused": "Refresh-tokens återanvänds för denna klient", "refresh-tokens-no-expire": "Refresh-tokens har oändlig livslängd", "registered": "Registrerad", + "registration-token": "Registerings-token:", + "registration-access-token": "Registrerings-access-token", + "registration-token-error": "Något problem uppstod när denna klients registrerings-token skulle hämtas.", "request-object-signing-algorithm": "Signeringsalgoritm för request-object ", "request-uri": "Request-länkar", "require-auth-time": "Kräv authentication-time", "require-auth-time-label": "Kräv att auth_time-claim alltid skickas med id_token", "response-types": "Svarstyper", + "rotate-registration-token": "Rotera registerings-token", + "rotate-registration-token-confirm": "Är du säker på att du vill rotera denna klients registerings-token?", + "rotate-registration-token-error": "Något problem uppstod när denna klients registrerings-token skulle roteras.", + "saved": { + "no-secret": "Ingen klienthemlighet", + "saved": "Klienten är sparad", + "secret": "Hemlighet:", + "show-secret": "Visa hemlighet", + "unchanged": "oförändrad" + }, "seconds": "sekunder", "secret-asymmetric-jwt": "Asymmetriskt signerad JWT assertion", "secret-http": "Klienthemlighet över HTTP Basic", diff --git a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html index 996199315..4cdb0fc35 100644 --- a/openid-connect-server-webapp/src/main/webapp/resources/template/client.html +++ b/openid-connect-server-webapp/src/main/webapp/resources/template/client.html @@ -547,11 +547,11 @@