First successful translation of template string.

pull/763/head
Fredrik Jönsson 2015-02-06 00:01:17 +01:00
parent 8f64e0c454
commit 5a7e70a18e
5 changed files with 14 additions and 4 deletions

View File

@ -37,8 +37,9 @@
<script type="text/javascript" src="resources/js/lib/i18next-1.7.7.js"></script>
<script type="text/javascript">
$.i18n.init({
fallbackLng: "en",
lng: "${pageContext.response.locale}",
resGetPath: 'resources/js/locale/__lng__/messages.json'
resGetPath: "resources/js/locale/__lng__/messages.json"
});
// safely set the title of the application
function setPageTitle(title) {

View File

@ -96,7 +96,7 @@ var ApprovedSiteListView = Backbone.View.extend({
}, this);
this.togglePlaceholder();
$(this.el).i18n();
return this;
},
@ -241,7 +241,7 @@ var ApprovedSiteView = Backbone.View.extend({
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.el).i18n();
return this;
},

View File

@ -1,5 +1,9 @@
{
"client": {
"newClient": "New Client"
},
"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."
}
}

View File

@ -1,5 +1,10 @@
{
"client": {
"newClient": "New Client"
},
"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."
}
}

View File

@ -33,7 +33,7 @@
<div class="tab-pane active" id="grant-approved-tab">
<p>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.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">