Browse Source

Translate searches in client table.

pull/763/head
Fredrik Jönsson 10 years ago
parent
commit
d308f58e71
  1. 20
      openid-connect-server-webapp/src/main/webapp/resources/js/client.js
  2. 13
      openid-connect-server-webapp/src/main/webapp/resources/js/locale/en/messages.json
  3. 13
      openid-connect-server-webapp/src/main/webapp/resources/js/locale/sv/messages.json
  4. 2
      openid-connect-server-webapp/src/main/webapp/resources/template/client.html

20
openid-connect-server-webapp/src/main/webapp/resources/js/client.js

@ -100,32 +100,32 @@ var ClientModel = Backbone.Model.extend({
if (term) {
if (this.get('clientId').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('id');
matches.push($.t('client.client-table.match.id'));
}
if (this.get('clientName') != null && this.get('clientName').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('name');
matches.push($.t('client.client-table.match.name'));
}
if (this.get('clientDescription') != null && this.get('clientDescription').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('description');
matches.push($.t('client.client-table.match.description'));
}
if (this.get('clientUri') != null && this.get('clientUri').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('homepage');
matches.push($.t('client.client-table.match.homepage'));
}
if (this.get('policyUri') != null && this.get('policyUri').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('policy');
matches.push($.t('client.client-table.match.policy'));
}
if (this.get('tosUri') != null && this.get('tosUri').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('terms of service');
matches.push($.t('client.client-table.match.terms'));
}
if (this.get('logoUri') != null && this.get('logoUri').toLowerCase().indexOf(term.toLowerCase()) != -1) {
matches.push('logo');
matches.push($.t('client.client-table.match.logo'));
}
if (this.get('contacts') != null) {
var f = _.filter(this.get('contacts'), function(item) {
return item.toLowerCase().indexOf(term.toLowerCase()) != -1;
});
if (f.length > 0) {
matches.push('contacts');
matches.push($.t('client.client-table.match.contacts'));
}
}
if (this.get('redirectUris') != null) {
@ -133,7 +133,7 @@ var ClientModel = Backbone.Model.extend({
return item.toLowerCase().indexOf(term.toLowerCase()) != -1;
});
if (f.length > 0) {
matches.push('redirect uri');
matches.push($.t('client.client-table.match.redirect'));
}
}
if (this.get('scope') != null) {
@ -141,7 +141,7 @@ var ClientModel = Backbone.Model.extend({
return item.toLowerCase().indexOf(term.toLowerCase()) != -1;
});
if (f.length > 0) {
matches.push('scope');
matches.push($.t('client.client-table.match.scope'));
}
}
} else {

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

@ -63,6 +63,19 @@
"type-web": "Web"
},
"client-table": {
"match": {
"contacts": "contacts",
"description": "description",
"homepage": "home page",
"id": "id",
"logo": "logo",
"name": "name",
"policy": "policy",
"redirect": "redirect uri",
"scope": "scope",
"terms": "terms of service"
},
"matched-search": "Matched search:",
"new": "New Client",
"no-clients": "There are no registered clients on this server.",
"no-matches": "There are no clients that match your search criteria.",

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

@ -63,6 +63,19 @@
"type-web": "Webb"
},
"client-table": {
"match": {
"contacts": "kontakter",
"description": "beskrivning",
"homepage": "hemsida",
"id": "id",
"logo": "logotyp",
"name": "namn",
"policy": "policy",
"redirect": "omdirigeringslänk",
"scope": "scope",
"terms": "villkor för tjänsten"
},
"matched-search": "Matchade sökning:",
"new": "Ny klient",
"no-clients": "Det finns inga klienter registrerade.",
"no-matches": "Det finns inga klienter som matchar din sökning.",

2
openid-connect-server-webapp/src/main/webapp/resources/template/client.html

@ -46,7 +46,7 @@
<small class="muted" title="<%- hoverCreationDate %>"><i class="icon-time"></i> <span data-i18n="client.client-table.registered">Registered</span> <%- displayCreationDate %></small>
</div>
<div class="matched text-info">
<small><i>Matched search: <span class="label label-matched"></span></i></small>
<small><i><span data-i18n="client.client-table.matched-search">Matched search:</span> <span class="label label-matched"></span></i></small>
</div>
</td>

Loading…
Cancel
Save