Most of grant page translated.

pull/763/head
Fredrik Jönsson 2015-02-06 09:59:32 +01:00
parent 5a7e70a18e
commit b2d2a95a47
5 changed files with 90 additions and 35 deletions

View File

@ -47,9 +47,10 @@ var ApprovedSiteListView = Backbone.View.extend({
}
$('#loadingbox').sheet('show');
$('#loading').html('<span class="label" id="loading-grants">Approved Sites</span> ' +
'<span class="label" id="loading-clients">Clients</span> ' +
'<span class="label" id="loading-scopes">Scopes</span> '
$('#loading').html(
'<span class="label" id="loading-grants">' + $.t('grant.grant-table.approved-sites') + '</span> ' +
'<span class="label" id="loading-clients">' + $.t('common.clients') + '</span> ' +
'<span class="label" id="loading-scopes">' + $.t('common.scopes') + '</span> '
);
$.when(this.model.fetchIfNeeded({success:function(e) {$('#loading-grants').addClass('label-success');}}),
@ -137,9 +138,9 @@ var ApprovedSiteListView = Backbone.View.extend({
e.preventDefault();
var _self = this;
$('#loadingbox').sheet('show');
$('#loading').html('<span class="label" id="loading-grants">Approved Sites</span> ' +
'<span class="label" id="loading-clients">Clients</span> ' +
'<span class="label" id="loading-scopes">Scopes</span> '
$('#loading').html('<span class="label" id="loading-grants">' + $.t('grant.grant-table.approved-sites') + '</span> ' +
'<span class="label" id="loading-clients">' + $.t('common.clients') + '</span> ' +
'<span class="label" id="loading-scopes">' + $.t('common.scopes') + '</span> '
);
$.when(this.model.fetch({success:function(e) {$('#loading-grants').addClass('label-success');}}),
@ -238,9 +239,9 @@ var ApprovedSiteView = Backbone.View.extend({
$('.client-more-info-block', this.el).html(this.moreInfoTemplate({client: this.options.client.toJSON()}));
this.$('.dynamically-registered').tooltip({title: 'This client was dynamically registered'});
this.$('.whitelisted-site').tooltip({title: 'This site was whitelisted by an adminstrator'});
this.$('.tokens').tooltip({title: 'Number of currently active access tokens.'});
this.$('.dynamically-registered').tooltip({title: $.t('grant.grant-table.dynamically-registered')});
this.$('.whitelisted-site').tooltip({title: $.t('grant.grant-table.whitelisted-site')});
this.$('.tokens').tooltip({title: $.t('grant.grant-table.active-tokens')});
$(this.el).i18n();
return this;
},

View File

@ -1,9 +1,37 @@
{
"client": {
"more-info": {
"contacts": "Administrative Contacts:",
"home": "Home Page:",
"more": "more information",
"policy": "Policy:",
"terms": "Terms of Service:"
},
"newClient": "New Client"
},
"common": {
"clients": "Clients",
"scopes": "Scopes"
},
"grant": {
"text": "These are sites you have approved manually. If the same site asks for the same access in the future, it will be granted without prompting."
"more-info": "more information",
"refresh": "Refresh",
"revoke": "Revoke",
"grant-table": {
"active-tokens": "Number of currently active access tokens",
"application": "Application",
"approved-sites": "Approved Sites",
"authorized": "Auktoriserad:",
"dynamically-registered": "This client was dynamically registered",
"expires": "Expires:",
"last-accessed": "Last accessed:",
"no-sites": "You have not approved any sites.",
"no-whitelisted": "You have not accessed any whitelisted sites.",
"pre-approved": "These are sites that have been pre-approved by an administrator.",
"text": "These are sites you have approved manually. If the same site asks for the same access in the future, it will be granted without prompting.",
"whitelist-note": "<b>NOTE:</b> If you revoke them here, they will automatically be re-approved on your next visit wthout prompting.",
"whitelisted-site": "This site was whitelisted by an adminstrator",
"whitelisted-sites": "Whitelisted Sites"
}
}
}

View File

@ -1,10 +1,36 @@
{
"client": {
"newClient": "New Client"
"more-info": {
"contacts": "Administrativ kontakt:",
"home": "Webbplats:",
"more": "mer information",
"policy": "Policy:",
"terms": "Villkor för tjänsten"
},
"newClient": "Ny klient"
},
"common": {
"clients": "Klienter",
"scopes": "Scope"
},
"grant": {
"text": "Detta är webbplatser som du har godkänt manuellt. Om samma webbplatser begär samma åtkomst igen blir den medgiven utan att fråga på nytt."
"refresh": "Uppdatera",
"revoke": "Återkalla",
"grant-table": {
"active-tokens": "Antal nu aktiva åtkomst-tokens",
"application": "Webbplats",
"approved-sites": "Godkända webbplatser",
"authorized": "Auktoriserad:",
"dynamically-registered": "Denna klient registrerades dynamiskt",
"expires": "Går ut:",
"last-accessed": "Senast använd:",
"no-sites": "Du har inte godkänt någon webbplats.",
"no-whitelisted": "Du har inte besökt några vitlistade webbplatser.",
"pre-approved": "Detta är webbplatser som är godkända i förväg av en administratör.",
"text": "Det här är webbplatser som du själv har godkänt. Om en av dessa webbplatser begär samma information igen blir det medgivet utan att du blir tillfrågad.",
"whitelist-note": "<b>OBS:</b> Om du återkallar dem kommer de automatiskt att godkännas igen nästa gång du besöker dem utan att du blir tillfrågad.",
"whitelisted-site": "Denna webbplats är vitlistad av en administratör",
"whitelisted-sites": "Vitlistade webbplatser"
}
}
}

View File

@ -98,22 +98,22 @@
<div class="muted moreInformationContainer">
<% if (client.clientUri || client.policyUri || client.tosUri || client.contacts) { %>
<div class="toggleMoreInformation" style="cursor: pointer;">
<i class="icon-chevron-right"></i> <small>more information</small>
<i class="icon-chevron-right"></i> <small data-i18n="client.more-info.more">more information</small>
</div>
<div class="moreInformation hide">
<%-client.clientDescription%>
<ul>
<% if (client.clientUri) { %>
<li>Home page: <a href="<%- client.clientUri %>"><%- client.clientUri %></a></li>
<li><span data-i18n="client.more-info.home">Home Page:</span> <a href="<%- client.clientUri %>"><%- client.clientUri %></a></li>
<% } %>
<% if (client.policyUri) { %>
<li>Policy: <a href="<%- client.policyUri %>"><%- client.policyUri %></a></li>
<li><span data-i18n="client.more-info.policy">Policy:</span> <a href="<%- client.policyUri %>"><%- client.policyUri %></a></li>
<% } %>
<% if (client.tosUri) { %>
<li>Terms of Service: <a href="<%- client.tosUri %>"><%- client.tosUri %></a></li>
<li><span data-i18n="client.more-info.terms">Terms of Service:</span> <a href="<%- client.tosUri %>"><%- client.tosUri %></a></li>
<% } %>
<% if (client.contacts != null && client.contacts.length > 0) { %>
<li>Administrative Contacts: <%- client.contacts.join(', ') %></li>
<li><span data-i18n="client.more-info.contacts">Administrative Contacts:</span> <%- client.contacts.join(', ') %></li>
<% } %>
</ul>
</div>

View File

@ -19,24 +19,24 @@
<script type="text/html" id="tmpl-grant-table">
<div class="well well-small">
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> Refresh</button>
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> <span data-i18n="grant.refresh">Refresh</span></button>
</div>
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a data-target="#grant-approved-tab" data-toggle="tab" href="#">Approved Sites <span class="label label-info" id="approvde-site-count">?</span></a></li>
<li><a data-target="#grant-whitelist-tab" data-toggle="tab" href="#">Whitelisted Sites <span class="label label-info" id="whitelist-count">?</span></a></li>
<li class="active"><a data-target="#grant-approved-tab" data-toggle="tab" href="#"><span data-i18n="grant.grant-table.approved-sites">Approved Sites</span> <span class="label label-info" id="approvde-site-count">?</span></a></li>
<li><a data-target="#grant-whitelist-tab" data-toggle="tab" href="#"><span data-i18n="grant.grant-table.whitelisted-sites">Whitelisted Sites</span> <span class="label label-info" id="whitelist-count">?</span></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="grant-approved-tab">
<p data-i18n="grant.text">These are sites you have approved manually. If the same site asks for the same access in the future, it will
<p data-i18n="grant.grant-table.text">These are sites you have approved manually. If the same site asks for the same access in the future, it will
be granted without prompting.</p>
<div id="grant-table-empty" class="alert alert-info">
<div id="grant-table-empty" class="alert alert-info" data-i18n="grant.grant-table.no-sites">
You have not approved any sites.
</div>
@ -44,7 +44,7 @@
<thead>
<tr>
<th></th>
<th>Application</th>
<th data-i18n="grant.grant-table.application">Application</th>
<th><i class="icon-time"></i></th>
<th><i class="icon-edit"></i></th>
</tr>
@ -57,10 +57,10 @@
<div class="tab-pane" id="grant-whitelist-tab">
<p>These are sites that have been pre-approved by an administrator.</p>
<p class="text-warning"><b>NOTE:</b> If you revoke them here, they will automatically be re-approved on your next visit wthout prompting.</p>
<p data-i18n="grant.grant-table.pre-approved">These are sites that have been pre-approved by an administrator.</p>
<p class="text-warning" data-i18n="[html]grant.grant-table.whitelist-note"><b>NOTE:</b> If you revoke them here, they will automatically be re-approved on your next visit wthout prompting.</p>
<div id="grant-whitelist-table-empty" class="alert alert-info">
<div id="grant-whitelist-table-empty" class="alert alert-info" data-i18n="grant.grant-table.no-whitelisted">
You have not accessed any whitelisted sites.
</div>
@ -68,7 +68,7 @@
<thead>
<tr>
<th></th>
<th>Application</th>
<th data-i18n="grant.grant-table.application">Application</th>
<th><i class="icon-time"></i></th>
<th><i class="icon-edit"></i></th>
</tr>
@ -84,7 +84,7 @@
</div>
<div class="well well-small">
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> Refresh</button>
<button class="btn btn-small refresh-table"><i class="icon-refresh"></i> <span data-i18n="grant.refresh">Refresh</span></button>
</div>
</script>
@ -107,20 +107,20 @@
<td>
<div>
<i>Authorized:</i> <span title="<%- formattedDate.hoverCreationDate %>"><%- formattedDate.displayCreationDate %></span>
<i data-i18n="grant.grant-table.authorized">Authorized:</i> <span title="<%- formattedDate.hoverCreationDate %>"><%- formattedDate.displayCreationDate %></span>
</div>
<div>
<i>Last accessed:</i> <span title="<%- formattedDate.hoverAccessDate %>"><%- formattedDate.displayAccessDate %></span>
<i data-i18n="grant.grant-table.last-accessed">Last accessed:</i> <span title="<%- formattedDate.hoverAccessDate %>"><%- formattedDate.displayAccessDate %></span>
</div>
<div>
<i>Expires:</i> <span title="<%- formattedDate.hoverTimeoutDate %>"><%- formattedDate.displayTimeoutDate %></span>
<i data-i18n="grant.grant-table.expires">Expires:</i> <span title="<%- formattedDate.hoverTimeoutDate %>"><%- formattedDate.displayTimeoutDate %></span>
</div>
</td>
<td>
<button class="btn btn-danger btn-delete pull-right"><i class="icon-trash icon-white"></i> Revoke</button>
<button class="btn btn-danger btn-delete pull-right"><i class="icon-trash icon-white"></i> <span data-i18n="grant.revoke">Revoke</span></button>
</td>
</script>