remove // XXXs for translation keys

This commit is contained in:
David Benqué
2020-01-17 13:24:31 +00:00
parent bca9d223bb
commit 0bcb89310c

View File

@@ -1099,7 +1099,7 @@ define([
if (!hashes || (!hashes.editHash && !hashes.viewHash)) { return; } if (!hashes || (!hashes.editHash && !hashes.viewHash)) { return; }
// check if the pad is password protected // check if the pad is password protected
var hash = hashes.editHash || hashes.viewHash; var hash = hashes.editHash || hashes.viewHash;
var href = origin + pathname + '#' + hash; var href = origin + pathname + '#' + hash;
var parsedHref = Hash.parsePadUrl(href); var parsedHref = Hash.parsePadUrl(href);
@@ -1107,7 +1107,7 @@ define([
var makeFaqLink = function () { var makeFaqLink = function () {
var link = h('span', [ var link = h('span', [
h('i.fa.fa-question-circle'), h('i.fa.fa-question-circle'),
h('a', {href: '#'}, Messages.passwordFaqLink) h('a', {href: '#'}, Messages.passwordFaqLink)
]); ]);
$(link).click(function () { $(link).click(function () {
@@ -1115,7 +1115,7 @@ define([
}); });
return link; return link;
}; };
var parsed = Hash.parsePadUrl(pathname); var parsed = Hash.parsePadUrl(pathname);
var canPresent = ['code', 'slide'].indexOf(parsed.type) !== -1; var canPresent = ['code', 'slide'].indexOf(parsed.type) !== -1;
@@ -1130,8 +1130,8 @@ define([
Messages.share_linkPresent, false, { mark: {tabindex:1} }) : undefined, Messages.share_linkPresent, false, { mark: {tabindex:1} }) : undefined,
UI.createRadio('accessRights', 'cp-share-editable-true', UI.createRadio('accessRights', 'cp-share-editable-true',
Messages.share_linkEdit, false, { mark: {tabindex:1} })]), Messages.share_linkEdit, false, { mark: {tabindex:1} })]),
burnAfterReading = hashes.viewHash ? UI.createRadio('accessRights', 'cp-share-bar', Messages.burnAfterReading_linkBurnAfterReading || burnAfterReading = hashes.viewHash ? UI.createRadio('accessRights', 'cp-share-bar', Messages.burnAfterReading_linkBurnAfterReading,
'View once and self-destruct', false, { mark: {tabindex:1}, label: {style: "display: none;"} }) : undefined // XXX temp KEY false, { mark: {tabindex:1}, label: {style: "display: none;"} }) : undefined
]); ]);
// Burn after reading // Burn after reading
@@ -1140,7 +1140,7 @@ define([
// the options to generate the BAR url // the options to generate the BAR url
var barAlert = h('div.alert.alert-danger.cp-alertify-bar-selected', { var barAlert = h('div.alert.alert-danger.cp-alertify-bar-selected', {
style: 'display: none;' style: 'display: none;'
}, Messages.burnAfterReading_warningLink || " You have set this pad to self-destruct. Once a recipient opens this pad, it will be permanently deleted from the server."); // XXX temp KEY }, Messages.burnAfterReading_warningLink);
var channel = Hash.getSecrets('pad', hash, config.password).channel; var channel = Hash.getSecrets('pad', hash, config.password).channel;
common.getPadMetadata({ common.getPadMetadata({
channel: channel channel: channel
@@ -1182,7 +1182,7 @@ define([
cb(url); cb(url);
}); });
} }
return Messages.burnAfterReading_generateLink || 'Click on the button below to generate a link'; // XXX temp KEY return Messages.burnAfterReading_generateLink;
} }
var hash = (!hashes.viewHash || (edit && hashes.editHash)) ? hashes.editHash : hashes.viewHash; var hash = (!hashes.viewHash || (edit && hashes.editHash)) ? hashes.editHash : hashes.viewHash;
var href = burnAfterReading ? burnAfterReadingUrl : (origin + pathname + '#' + hash); var href = burnAfterReading ? burnAfterReadingUrl : (origin + pathname + '#' + hash);
@@ -1212,18 +1212,18 @@ define([
// Show alert if the pad is password protected // Show alert if the pad is password protected
if (hasPassword) { if (hasPassword) {
linkContent.push(h('div.alert.alert-primary', [ linkContent.push(h('div.alert.alert-primary', [
h('i.fa.fa-lock'), h('i.fa.fa-lock'),
Messages.share_linkPasswordAlert, h('br'), Messages.share_linkPasswordAlert, h('br'),
makeFaqLink() makeFaqLink()
])); ]));
} }
// warning about sharing links // warning about sharing links
var localStore = window.cryptpadStore; var localStore = window.cryptpadStore;
var dismissButton = h('span.fa.fa-times'); var dismissButton = h('span.fa.fa-times');
var shareLinkWarning = h('div.alert.alert-warning.dismissable', var shareLinkWarning = h('div.alert.alert-warning.dismissable',
{ style: 'display: none;' }, { style: 'display: none;' },
[ [
h('span.cp-inline-alert-text', Messages.share_linkWarning), h('span.cp-inline-alert-text', Messages.share_linkWarning),
dismissButton dismissButton
]); ]);
@@ -1303,12 +1303,11 @@ define([
onFriendShare.reg(saveValue); onFriendShare.reg(saveValue);
// XXX Don't display access rights if no contacts
var contactsContent = h('div.cp-share-modal'); var contactsContent = h('div.cp-share-modal');
var $contactsContent = $(contactsContent); var $contactsContent = $(contactsContent);
$contactsContent.append(friendsList); $contactsContent.append(friendsList);
// Show alert if the pad is password protected // Show alert if the pad is password protected
if (hasPassword) { if (hasPassword) {
$contactsContent.append(h('div.alert.alert-primary', [ $contactsContent.append(h('div.alert.alert-primary', [
@@ -1349,7 +1348,7 @@ define([
// Show alert if the pad is password protected // Show alert if the pad is password protected
if (hasPassword) { if (hasPassword) {
embedContent.push(h('div.alert.alert-primary', [ embedContent.push(h('div.alert.alert-primary', [
h('i.fa.fa-lock'), ' ', h('i.fa.fa-lock'), ' ',
Messages.share_embedPasswordAlert, h('br'), Messages.share_embedPasswordAlert, h('br'),
makeFaqLink() makeFaqLink()
])); ]));
@@ -1495,13 +1494,13 @@ define([
if (!hashes.fileHash) { throw new Error("You must provide a file hash"); } if (!hashes.fileHash) { throw new Error("You must provide a file hash"); }
var url = origin + pathname + '#' + hashes.fileHash; var url = origin + pathname + '#' + hashes.fileHash;
// check if the file is password protected // check if the file is password protected
var parsedHref = Hash.parsePadUrl(url); var parsedHref = Hash.parsePadUrl(url);
var hasPassword = parsedHref.hashData.password; var hasPassword = parsedHref.hashData.password;
var makeFaqLink = function () { var makeFaqLink = function () {
var link = h('span', [ var link = h('span', [
h('i.fa.fa-question-circle'), h('i.fa.fa-question-circle'),
h('a', {href: '#'}, Messages.passwordFaqLink) h('a', {href: '#'}, Messages.passwordFaqLink)
]); ]);
$(link).click(function () { $(link).click(function () {
@@ -1533,12 +1532,12 @@ define([
])); ]));
} }
// warning about sharing links // warning about sharing links
var localStore = window.cryptpadStore; var localStore = window.cryptpadStore;
var dismissButton = h('span.fa.fa-times'); var dismissButton = h('span.fa.fa-times');
var shareLinkWarning = h('div.alert.alert-warning.dismissable', var shareLinkWarning = h('div.alert.alert-warning.dismissable',
{ style: 'display: none;' }, { style: 'display: none;' },
[ [
h('span.cp-inline-alert-text', Messages.share_linkWarning), h('span.cp-inline-alert-text', Messages.share_linkWarning),
dismissButton dismissButton
]); ]);
@@ -1590,7 +1589,7 @@ define([
// Show alert if the pad is password protected // Show alert if the pad is password protected
if (hasPassword) { if (hasPassword) {
$contactsContent.append(h('div.alert.alert-primary', [ $contactsContent.append(h('div.alert.alert-primary', [
h('i.fa.fa-unlock'), h('i.fa.fa-unlock'),
Messages.share_contactPasswordAlert, h('br'), Messages.share_contactPasswordAlert, h('br'),
makeFaqLink() makeFaqLink()
])); ]));
@@ -1616,7 +1615,7 @@ define([
// Show alert if the pad is password protected // Show alert if the pad is password protected
if (hasPassword) { if (hasPassword) {
embed.append(h('div.alert.alert-primary', [ embed.append(h('div.alert.alert-primary', [
h('i.fa.fa-lock'), ' ', h('i.fa.fa-lock'), ' ',
Messages.share_embedPasswordAlert, h('br'), Messages.share_embedPasswordAlert, h('br'),
makeFaqLink() makeFaqLink()
])); ]));
@@ -1863,7 +1862,7 @@ define([
seeds: seeds, seeds: seeds,
}, waitFor(function (obj) { }, waitFor(function (obj) {
if (obj && obj.error) { if (obj && obj.error) {
waitFor.abort(); waitFor.abort();
$(linkSpin).hide(); $(linkSpin).hide();
$(linkForm).show(); $(linkForm).show();
$nav.find('button.cp-teams-invite-create').show(); $nav.find('button.cp-teams-invite-create').show();
@@ -4056,8 +4055,8 @@ define([
}; };
UIElements.displayBurnAfterReadingPage = function (common, cb) { UIElements.displayBurnAfterReadingPage = function (common, cb) {
var info = h('p.cp-password-info', Messages.burnAfterReading_warning || 'This document will self-destruct as soon as you open it. It will be removed form the server, once you close this window you will not be able to access it again. If you are not ready to proceed you can close this window and come back later. '); // XXX temp KEY var info = h('p.cp-password-info', Messages.burnAfterReading_warning);
var button = h('button.primary', Messages.burnAfterReading_proceed || 'view and delete'); // XXX temp KEY var button = h('button.primary', Messages.burnAfterReading_proceed);
$(button).on('click', function () { $(button).on('click', function () {
cb(); cb();
@@ -4072,7 +4071,7 @@ define([
UIElements.getBurnAfterReadingWarning = function (common) { UIElements.getBurnAfterReadingWarning = function (common) {
var priv = common.getMetadataMgr().getPrivateData(); var priv = common.getMetadataMgr().getPrivateData();
if (!priv.burnAfterReading) { return; } if (!priv.burnAfterReading) { return; }
return h('div.alert.alert-danger.cp-burn-after-reading', Messages.burnAfterReading_warningDeleted || 'This pad has been deleted from the server, once you close this window you will not be able to access it again.'); // XXX temp KEY return h('div.alert.alert-danger.cp-burn-after-reading', Messages.burnAfterReading_warningDeleted);
}; };
var crowdfundingState = false; var crowdfundingState = false;