Browse Source

Translate dialogs in dynreg.js.

pull/763/head
Fredrik Jönsson 10 years ago
parent
commit
a602d4c231
  1. 10
      openid-connect-server-webapp/src/main/webapp/resources/js/dynreg.js
  2. 2
      openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json
  3. 2
      openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json

10
openid-connect-server-webapp/src/main/webapp/resources/js/dynreg.js

@ -95,7 +95,7 @@ var DynRegRootView = Backbone.View.extend({
}
$('#loadingbox').sheet('show');
$('#loading').html('<span class="label" id="loading-scopes">Scopes</span> ');
$('#loading').html('<span class="label" id="loading-scopes">' + $.t('common.scopes') + '</span> ');
$.when(this.options.systemScopeList.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
.done(function() {
@ -144,12 +144,12 @@ var DynRegRootView = Backbone.View.extend({
view.load(function() {
$('#content').html(view.render().el);
view.delegateEvents();
setPageTitle("Edit a Dynamically Registered Client");
setPageTitle($.t('dynreg.edit-dynamically-registered'));
app.navigate('dev/dynreg/edit', {trigger: true});
self.remove();
});
}, error: function() {
$('#modalAlert div.modal-body').html("Invalid client or registration access token.");
$('#modalAlert div.modal-body').html($.t('dynreg.invalid-access-token'));
$("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog
"backdrop" : "static",
@ -188,7 +188,7 @@ var DynRegEditView = Backbone.View.extend({
}
$('#loadingbox').sheet('show');
$('#loading').html('<span class="label" id="loading-scopes">Scopes</span> ');
$('#loading').html('<span class="label" id="loading-scopes">' + $.t('common.scopes') + '</span> ');
$.when(this.options.systemScopeList.fetchIfNeeded({success:function(e) {$('#loading-scopes').addClass('label-success');}}))
.done(function() {
@ -213,7 +213,7 @@ var DynRegEditView = Backbone.View.extend({
deleteClient:function (e) {
e.preventDefault();
if (confirm("Are you sure sure you would like to delete this client?")) {
if (confirm($.t('client.client-table.confirm'))) {
var self = this;
this.model.destroy({

2
openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json

@ -202,8 +202,10 @@
"dynreg": {
"client-id-placeholder": "Enter Client ID",
"configuration-url": "Client Configuration URL",
"edit-dynamically-registered": "Edit a Dynamically Registered Client",
"edit-existing": "Edit an existing client",
"edit-existing-help": "Paste in your client ID and registration access token to access the client.",
"invalid-access-token": "Invalid client or registration access token.",
"new-client": "Register a new client",
"or": " - OR - ",
"regtoken-placeholder": "Enter Registration Access Token",

2
openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json

@ -205,8 +205,10 @@
"dynreg": {
"client-id-placeholder": "Mata in klient-ID",
"configuration-url": "Konfigurationslänk för klienten",
"edit-dynamically-registered": "Ändra en dynamiskt registrerad klient",
"edit-existing": "Ändra en befintlig klient",
"edit-existing-help": "Klistra in ditt klient-ID och registrerings-access-token för att komma åt klienten.",
"invalid-access-token": "Ogiltig klient eller registration-access-token.",
"new-client": "Registrera en ny klient",
"or": " - ELLER - ",
"regtoken-placeholder": "Mata in registration-access-token",

Loading…
Cancel
Save