finished l10n

This commit is contained in:
Abhinav Adduri 2017-07-19 09:04:27 -07:00
parent 7ed30f497b
commit 8c4cb90b3a
2 changed files with 11 additions and 5 deletions

View File

@ -47,8 +47,11 @@ $(document).ready(function() {
//on complete //on complete
if (percent === 1) { if (percent === 1) {
fileReceiver.removeAllListeners('progress'); fileReceiver.removeAllListeners('progress');
notify('Your download has finished.'); document.l10n.formatValues('downloadNotification', 'downloadFinish')
$('.title').html('Download Complete'); .then(translated => {
notify(translated[0]);
$('.title').html(translated[1]);
})
} }
}); });
@ -73,9 +76,10 @@ $(document).ready(function() {
fileReceiver fileReceiver
.download() .download()
.catch(() => { .catch(() => {
$('.title').text( document.l10n.formatValue('expiredPageHeader')
'This link has expired or never existed in the first place.' .then(translated => {
); $('.title').text(translated);
})
$('#download-btn').hide(); $('#download-btn').hide();
$('#expired-img').show(); $('#expired-img').show();
console.log('The file has expired, or has already been deleted.'); console.log('The file has expired, or has already been deleted.');

View File

@ -45,6 +45,8 @@ downloadFileSize = ({ $size })
downloadMessage = Your friend is sending you a file with Firefox Send, a service that allows you to share files with a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. downloadMessage = Your friend is sending you a file with Firefox Send, a service that allows you to share files with a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever.
downloadButtonLabel = Download downloadButtonLabel = Download
.title = {downloadButtonLabel} .title = {downloadButtonLabel}
downloadNotification = Your download has completed.
downloadFinish = Download Complete
sendYourFilesLink = Try Firefox Send sendYourFilesLink = Try Firefox Send
.title = {sendYourFilesLink} .title = {sendYourFilesLink}