Improve implementation of i18n for Install Flow following comments on #611
* Move install flow i18n logic to install_view.js (from options.js) * Switch to using placeholders (instead of jQuery) for i18n messages with html. * Switch to using moustache template instead of jQuery for i18n substitution. // FREEBIE
This commit is contained in:
parent
0825d3e22f
commit
ac25b62fdc
6 changed files with 99 additions and 87 deletions
|
@ -58,31 +58,4 @@
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 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);
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue