replaced the term "paste" with the more generic "document"

Some of the references to "paste" in code or comments got changed as well, but to clarify the intended usage of the terms:

- A PrivateBin document can consist of a paste text (key "paste" in the encrypted payload) and one or several attachments and discussion entries.
- Internally the root document is called a "Paste" and each discussion entry is called a "Discussion".
- When referring to a whole document with one paste and optional discussion(s), we call it just "document".
- When talking about a particular JSON payload type in the internal logic, i.e. during storage or transmission, we call them a paste or discussion to distinguish which type we refer to.

closes #397
This commit is contained in:
El RIDO 2025-07-24 10:46:31 +02:00
parent e2bf8ffb2d
commit ddd2d72064
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
62 changed files with 1141 additions and 1140 deletions

View file

@ -4,7 +4,7 @@ const common = require('../common');
describe('CopyToClipboard', function() {
this.timeout(30000);
describe ('Copy paste to clipboard', function () {
describe ('Copy document to clipboard', function () {
jsc.property('Copy with button click',
common.jscFormats(),
'nestring',
@ -13,7 +13,7 @@ describe('CopyToClipboard', function() {
common.enableClipboard();
$('body').html(
'<div id="placeholder" class="hidden">+++ no paste text ' +
'<div id="placeholder" class="hidden">+++ no document text ' +
'+++</div><div id="prettymessage" class="hidden">' +
'<button type="button" id="prettyMessageCopyBtn"><svg id="copyIcon"></svg>' +
'<svg id="copySuccessIcon"></svg></button><pre ' +
@ -40,7 +40,7 @@ describe('CopyToClipboard', function() {
/**
* Unfortunately in JSVerify impossible to check if copy with shortcut when user selected some text on the page
* (the copy paste to clipboard should not work in this case) due to lacking window.getSelection() in jsdom.
* (the copy document to clipboard should not work in this case) due to lacking window.getSelection() in jsdom.
*/
jsc.property('Copy with keyboard shortcut',
common.jscFormats(),
@ -50,7 +50,7 @@ describe('CopyToClipboard', function() {
common.enableClipboard();
$('body').html(
'<div id="placeholder">+++ no paste text ' +
'<div id="placeholder">+++ no document text ' +
'+++</div><div id="prettymessage" class="hidden">' +
'<button type="button" id="prettyMessageCopyBtn"><svg id="copyIcon"></svg>' +
'<svg id="copySuccessIcon"></svg></button><pre ' +

View file

@ -16,7 +16,7 @@ describe('Editor', function () {
'role="presentation" class="active"><a id="messageedit" ' +
'href="#">Editor</a></li><li role="presentation"><a ' +
'id="messagepreview" href="#">Preview</a></li></ul><div ' +
'id="placeholder" class="hidden">+++ no paste text +++</div>' +
'id="placeholder" class="hidden">+++ no document text +++</div>' +
'<div id="prettymessage" class="hidden"><pre id="prettyprint" ' +
'class="prettyprint linenums:1"></pre></div><div ' +
'id="plaintext" class="hidden"></div><p><textarea ' +

View file

@ -23,7 +23,7 @@ describe('PasteStatus', function () {
this.timeout(30000);
jsc.property(
'creates a notification after a successfull paste upload',
'creates a notification after a successful document upload',
common.jscUrl(),
common.jscUrl(false),
function (url1, url2) {
@ -155,7 +155,7 @@ describe('PasteStatus', function () {
'\t\t<title>PrivateBin</title>\n' +
'\t</head>\n' +
'\t<body>\n' +
'\t\t<p>Your paste is <a id="pasteurl" href="' + shortUrlString + '">' + shortUrlString + '</a> <span id="copyhint">(Hit <kbd>Ctrl</kbd>+<kbd>c</kbd> to copy)</span></p>\n' +
'\t\t<p>Your document is <a id="pasteurl" href="' + shortUrlString + '">' + shortUrlString + '</a> <span id="copyhint">(Hit <kbd>Ctrl</kbd>+<kbd>c</kbd> to copy)</span></p>\n' +
'\t</body>\n' +
'</html>',
clean = jsdom();

View file

@ -13,7 +13,7 @@ describe('PasteViewer', function () {
var clean = jsdom(),
results = [];
$('body').html(
'<div id="placeholder" class="hidden">+++ no paste text ' +
'<div id="placeholder" class="hidden">+++ no document text ' +
'+++</div><div id="prettymessage" class="hidden"><pre ' +
'id="prettyprint" class="prettyprint linenums:1"></pre>' +
'</div><div id="plaintext" class="hidden"></div>'
@ -99,7 +99,7 @@ describe('PasteViewer', function () {
var clean = jsdom(),
text = prefix + xss + suffix;
$('body').html(
'<div id="placeholder" class="hidden">+++ no paste text ' +
'<div id="placeholder" class="hidden">+++ no document text ' +
'+++</div><div id="prettymessage" class="hidden"><pre ' +
'id="prettyprint" class="prettyprint linenums:1"></pre>' +
'</div><div id="plaintext" class="hidden"></div>'

View file

@ -8,7 +8,7 @@ describe('ServerInteraction', function () {
await new Promise(resolve => setTimeout(resolve, 1900));
});
this.timeout(30000);
it('can prepare an encrypted paste', function () {
it('can prepare an encrypted document', function () {
jsc.assert(jsc.forall(
'string',
'string',

View file

@ -8,7 +8,7 @@ describe('TopNav', function () {
});
it(
'displays & hides navigation elements for viewing an existing paste',
'displays & hides navigation elements for viewing an existing document',
function () {
var results = [];
$('body').html(
@ -63,7 +63,7 @@ describe('TopNav', function () {
});
it(
'displays & hides navigation elements for creating a paste',
'displays & hides navigation elements for creating a document',
function () {
var results = [];
$('body').html(
@ -124,7 +124,7 @@ describe('TopNav', function () {
});
it(
'displays the button for creating a paste',
'displays the button for creating a document',
function () {
var results = [];
$('body').html(
@ -151,7 +151,7 @@ describe('TopNav', function () {
});
it(
'hides the button for cloning a paste',
'hides the button for cloning a document',
function () {
var results = [];
$('body').html(

View file

@ -27,7 +27,7 @@ describe('UiHelper', function () {
);
jsc.property(
'does not redirect to home, when a new paste is created',
'does not redirect to home, when a new document is created',
common.jscUrl(false),
jsc.nearray(common.jscBase64String()),
function (url, fragment) {