i18n for UMA policy management page
parent
ee9413b882
commit
2db607ec28
|
@ -1137,7 +1137,7 @@ var AppRouter = Backbone.Router.extend({
|
|||
{text:$.t('admin.home'), href:""},
|
||||
{text:$.t('policy.resource-sets'), href:"manage/#user/policy"},
|
||||
{text:$.t('policy.edit-policies'), href:"manage/#user/policy/" + rsid},
|
||||
{text:$.t('policy.edit-policy'), href:"manage/#user/policy/" + rsid + "/new"}
|
||||
{text:$.t('policy.new-policy'), href:"manage/#user/policy/" + rsid + "/new"}
|
||||
]);
|
||||
|
||||
this.updateSidebar('user/policy');
|
||||
|
|
|
@ -341,24 +341,41 @@
|
|||
},
|
||||
"policy" : {
|
||||
"resource-sets": "Resource Sets",
|
||||
"edit-policies": "Edit Policies",
|
||||
"new-policy": "New Policy",
|
||||
"edit-policy": "Edit Policy",
|
||||
"required-claims": "Required Claims",
|
||||
"policy-table": {
|
||||
"confirm": "Are you sure you want to delete this resource set?",
|
||||
"delete": "Delete",
|
||||
"edit": "Edit Policies",
|
||||
"email-address": "email address",
|
||||
"required-claims": "Users that you share this resource will with need to be able to present the following claims in order to access the resource.",
|
||||
"loading-policies": "Policies",
|
||||
"loading-policy": "Policy",
|
||||
"loading-rs": "Resource Set",
|
||||
"rs-table": {
|
||||
"confirm": "Are you sure you want to delete this resource set?"
|
||||
"no-resource-sets": "There are no resource sets registered. Introduce a protected to this authorization server to let it register some.",
|
||||
"no-required-claims": "There are no required claims for this resource set: This resource set is inaccessible by others.",
|
||||
"share-email": "Share with email address",
|
||||
"scopes": "Scopes"
|
||||
"shared-with": "Shared with:",
|
||||
"shared-nobody": "NOBODY",
|
||||
"shared-nobody-tooltip": "This resource is not accessible by anyone else, edit the policies and share it with someone.",
|
||||
"sharing": "Sharing Policies"
|
||||
},
|
||||
"policy-table": {
|
||||
"new": "Add New Policy",
|
||||
"return": "Return to list",
|
||||
"edit": "Edit Policy",
|
||||
"confirm": "Are you sure you want to delete this policy?",
|
||||
"delete": "Delete",
|
||||
"no-policies": "There are no policies for this resource set: This resource set is inaccessible by others.",
|
||||
"required-claims": "Required Claims",
|
||||
"required-claims-info": "Users that you share this resource will with need to be able to present the following claims in order to access the resource.",
|
||||
"remove": "Remove",
|
||||
"issuers": "Issuers",
|
||||
"claim": "Claim",
|
||||
"value": "Value"
|
||||
},
|
||||
"policy-form": {
|
||||
"email-address": "email address",
|
||||
"share-email": "Share with email address",
|
||||
"new": "New Policy",
|
||||
"edit": "Edit Policy"
|
||||
},
|
||||
"webfinger-error": "Error",
|
||||
"webfinger-error-description": "The server was unable to find an identity provider for <code>__email__</code>."
|
||||
},
|
||||
|
|
|
@ -183,7 +183,7 @@ var ResourceSetView = Backbone.View.extend({
|
|||
deleteResourceSet:function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (confirm($.t('policy.policy-table.confirm'))) {
|
||||
if (confirm($.t('policy.rs-table.confirm'))) {
|
||||
var _self = this;
|
||||
|
||||
this.model.destroy({
|
||||
|
@ -310,7 +310,7 @@ var PolicyListView = Backbone.View.extend({
|
|||
}, this);
|
||||
|
||||
this.togglePlaceholder();
|
||||
// $(this.el).i18n();
|
||||
$(this.el).i18n();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
@ -346,7 +346,7 @@ var PolicyView = Backbone.View.extend({
|
|||
removePolicy:function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (confirm($.t('policy.policy-table.policy-confirm'))) {
|
||||
if (confirm($.t('policy.policy-table.confirm'))) {
|
||||
var _self = this;
|
||||
this.model.destroy({
|
||||
success:function () {
|
||||
|
@ -386,7 +386,7 @@ var PolicyView = Backbone.View.extend({
|
|||
|
||||
$('.scope-list', this.el).html(this.scopeTemplate({scopes: this.model.get('scopes'), systemScopes: this.options.systemScopeList}));
|
||||
|
||||
//$(this.el).i18n();
|
||||
$(this.el).i18n();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ var PolicyFormView = Backbone.View.extend({
|
|||
|
||||
$('#loadingbox').sheet('show');
|
||||
$('#loading').html(
|
||||
'<span class="label" id="loading-policies">' + $.t('policy.loading-policies') + '</span> ' +
|
||||
'<span class="label" id="loading-policies">' + $.t('policy.loading-policy') + '</span> ' +
|
||||
'<span class="label" id="loading-rs">' + $.t('policy.loading-rs') + '</span> ' +
|
||||
'<span class="label" id="loading-scopes">' + $.t("common.scopes") + '</span> '
|
||||
);
|
||||
|
@ -531,6 +531,8 @@ var PolicyFormView = Backbone.View.extend({
|
|||
|
||||
this.$el.html(this.template({policy: json, rs: rs}));
|
||||
|
||||
$(this.el).i18n();
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
|
@ -21,7 +21,7 @@
|
|||
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> <span data-i18n="common.refresh">Refresh</span></button>
|
||||
</div>
|
||||
|
||||
<div id="resource-set-table-empty" class="alert alert-info" data-i18n="policy.policy-table.no-resource-sets">
|
||||
<div id="resource-set-table-empty" class="alert alert-info" data-i18n="policy.rs-table.no-resource-sets">
|
||||
There are no resource sets registered. Introduce a protected to this authorization server to let it register some.
|
||||
</div>
|
||||
|
||||
|
@ -47,11 +47,11 @@
|
|||
<span title="<%- client.clientId %>"><%- client.clientName != null ? client.clientName : ( client.clientId.substr(0,8) + '...' ) %></span>
|
||||
<div class="client-more-info-block"></div>
|
||||
<div class="scope-list"></div>
|
||||
<div><span class="text-warning" data-i18n="policy.policy-table.shared-with"><i class="icon-share"></i> Shared with:</span>
|
||||
<div><span class="text-warning" data-i18n="policy.rs-table.shared-with"><i class="icon-share"></i> Shared with:</span>
|
||||
<% if (!_.isEmpty(rs.policies)) {
|
||||
%><span class="label label-info"><%- _.size(rs.policies) %></span>
|
||||
<% } else { %>
|
||||
<span class="label label-important" data-i18n="policy.policy-table.shared-nobody;[title]policy.policy-table.shared-nobody-tooltip" title="This resource is not accessible by anyone else, edit the policies and share it with someone.">NOBODY</span>
|
||||
<span class="label label-important" data-i18n="policy.rs-table.shared-nobody;[title]policy.rs-table.shared-nobody-tooltip" title="This resource is not accessible by anyone else, edit the policies and share it with someone.">NOBODY</span>
|
||||
<% } %>
|
||||
|
||||
|
||||
|
@ -60,8 +60,8 @@
|
|||
|
||||
<td>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-info btn-edit"><i class="icon-share icon-white"></i> <span data-i18n="policy.policy-table.sharing">Sharing Policies</span></button>
|
||||
<button class="btn btn-danger btn-delete"><i class="icon-trash icon-white"></i> <span data-i18n="policy.policy-table.delete">Delete</span></button>
|
||||
<button class="btn btn-info btn-edit"><i class="icon-share icon-white"></i> <span data-i18n="policy.rs-table.sharing">Sharing Policies</span></button>
|
||||
<button class="btn btn-danger btn-delete"><i class="icon-trash icon-white"></i> <span data-i18n="policy.rs-table.delete">Delete</span></button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
@ -73,19 +73,19 @@
|
|||
<button class="btn btn-small btn-cancel"><i class="icon-list"></i> <span data-i18n="policy.policy-table.return">Return to list</span></button>
|
||||
</div>
|
||||
|
||||
<div id="policy-info" class="alert alert-info" data-i18n="policy.policy-table.required-claims">
|
||||
<div id="policy-info" class="alert alert-info" data-i18n="policy.policy-table.required-claims-info">
|
||||
Users that you share this resource will with need to be able to present the following claims in order to access the resource.
|
||||
</div>
|
||||
|
||||
<div id="policy-table-empty" class="alert alert-danger" data-i18n="policy.policy-table.no-required-claims">
|
||||
<div id="policy-table-empty" class="alert alert-danger" data-i18n="policy.policy-table.no-policies">
|
||||
There are no policies for this resource set: This resource set is inaccessible by others.
|
||||
</div>
|
||||
|
||||
<table id="policy-table" class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-i18n="policy.policy-table.issuers">Required Claims</th>
|
||||
<th data-i18n="policy.policy-table.claim">Scopes</th>
|
||||
<th data-i18n="policy.policy-table.required-claims">Required Claims</th>
|
||||
<th data-i18n="policy.rs-table.scopes">Scopes</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -154,8 +154,8 @@
|
|||
<div id="add-required-claim">
|
||||
<form class="form-horizontal">
|
||||
<fieldset>
|
||||
<input type="text" id="email" placeholder="email address" data-i18n="[placeholder]policy.policy-table.email-address" />
|
||||
<button class="btn btn-info btn-share"><i class="icon-share icon-white"></i> <span data-i18n="policy.policy-table.share-email">Share with email address</span></button>
|
||||
<input type="text" id="email" placeholder="email address" data-i18n="[placeholder]policy.policy-form.email-address" />
|
||||
<button class="btn btn-info btn-share"><i class="icon-share icon-white"></i> <span data-i18n="policy.policy-form.share-email">Share with email address</span></button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue