Implement i18n for Install Flow

Fixes #600

// FREEBIE
This commit is contained in:
Sam Lanning 2016-01-16 12:59:01 +00:00 committed by lilia
parent 3a494bf2a3
commit 0825d3e22f
4 changed files with 92 additions and 22 deletions

View file

@ -58,4 +58,31 @@
});
});
});
// Apply i18n
$(document).ready(function(){
// Basic Substitution
$('[data-i18n]').each(function(){
var $this = $(this);
$this.text(i18n($this.data('i18n')));
});
// Text with link to Play Store
var $installSignalLinkContent = $('<span>' + i18n('installSignalLink') + '</span>');
$installSignalLinkContent.find('a').attr({
class: 'link',
href: 'https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms',
target: '_blank'
});
$('#installSignalLink').append($installSignalLinkContent);
// Text with link to Twitter
var $installFollowUsContent = $('<span>' + i18n('installFollowUs') + '</span>');
$installFollowUsContent.find('a').attr({
class: 'link',
href: 'https://twitter.com/whispersystems',
target: '_blank'
});
$('#installFollowUs').append($installFollowUsContent);
});
})();

View file

@ -19,7 +19,7 @@
};
},
clearQR: function() {
this.$('#qr').text("Connecting...");
this.$('#qr').text(i18n("installConnecting"));
},
setProvisioningUrl: function(url) {
this.$('#qr').html('');
@ -47,7 +47,7 @@
this.$('#device-name').focus();
return;
}
this.$('.progress-dialog .status').text('Generating Keys');
this.$('.progress-dialog .status').text(i18n('installGeneratingKeys'));
this.selectStep(5);
resolve(name);
}.bind(this));
@ -61,7 +61,7 @@
this.$('#step' + step).show();
},
showSync: function() {
this.$('.progress-dialog .status').text('Syncing groups and contacts');
this.$('.progress-dialog .status').text(i18n('installSyncingGroupsAndContacts'));
this.$('.progress-dialog .bar').addClass('progress-bar-striped active');
},
showTooManyDevices: function() {