ep_comments_page 1.0.38 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/apiUtils.js +37 -20
- package/index.js +29 -27
- package/locales/es.json +10 -1
- package/locales/fr.json +8 -7
- package/locales/ga.json +31 -0
- package/locales/got.json +15 -0
- package/locales/hu.json +4 -2
- package/locales/kaa.json +31 -0
- package/locales/kab.json +14 -0
- package/locales/ko.json +3 -2
- package/locales/lb.json +3 -2
- package/locales/nl.json +2 -2
- package/locales/pa.json +15 -0
- package/locales/pl.json +11 -9
- package/locales/pms.json +31 -0
- package/locales/ps.json +29 -0
- package/locales/ro.json +15 -0
- package/locales/sq.json +2 -1
- package/package.json +8 -8
- package/static/js/index.js +2 -2
- package/static/tests/backend/specs/api/commentReplies.js +56 -54
- package/static/tests/backend/specs/api/comments.js +57 -55
- package/static/tests/backend/specs/api/exportEtherpad.js +5 -2
- package/static/tests/backend/specs/api/exportHTML.js +34 -24
- package/static/tests/backend/specs/padCopy.js +18 -15
- package/static/tests/backend/specs/padRemove.js +18 -15
- package/static/tests/backend/specs/readOnlyPad.js +6 -4
- package/static/tests/utils.js +11 -9
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-

|
|
1
|
+
[](https://github.com/ether/ep_comments_page/actions/workflows/test-and-release.yml)
|
|
2
|
+
[](https://github.com/ether/ep_comments_page/actions/workflows/backend-tests.yml)
|
|
2
3
|
|
|
3
4
|
# Comments and annotations for Etherpad
|
|
4
5
|
|
package/apiUtils.js
CHANGED
|
@@ -1,31 +1,48 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const absolutePaths = require('ep_etherpad-lite/node/utils/AbsolutePaths');
|
|
4
|
-
const fs = require('fs');
|
|
5
3
|
const padManager = require('ep_etherpad-lite/node/db/PadManager');
|
|
6
4
|
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
|
7
5
|
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
// Validate authorization - checks API key or JWT token depending on auth method
|
|
7
|
+
const validateAuth = async (req, res) => {
|
|
8
|
+
try {
|
|
9
|
+
// If API key auth is configured
|
|
10
|
+
const apiKeyHandler = require('ep_etherpad-lite/node/handler/APIKeyHandler');
|
|
11
|
+
const apikey = apiKeyHandler.apikey;
|
|
12
|
+
if (apikey !== null && apikey.trim().length > 0) {
|
|
13
|
+
const fields = Object.assign({}, req.query, req.body);
|
|
14
|
+
const receivedKey = fields.apikey || fields.api_key || req.headers.authorization;
|
|
15
|
+
if (receivedKey !== apikey.trim()) {
|
|
16
|
+
res.statusCode = 401;
|
|
17
|
+
res.json({code: 4, message: 'no or wrong API Key', data: null});
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
// SSO/JWT auth
|
|
24
|
+
if (!req.headers.authorization) {
|
|
25
|
+
res.statusCode = 401;
|
|
26
|
+
res.json({code: 4, message: 'no or wrong API Key', data: null});
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const {jwtVerify} = require('jose');
|
|
30
|
+
const {jwtDecode} = require('jwt-decode');
|
|
31
|
+
const {publicKeyExported} = require('ep_etherpad-lite/node/security/OAuth2Provider');
|
|
32
|
+
const clientIds = settings.sso?.clients?.map((client) => client.client_id) ?? [];
|
|
33
|
+
const jwtToCheck = req.headers.authorization.replace('Bearer ', '');
|
|
34
|
+
const payload = jwtDecode(jwtToCheck);
|
|
35
|
+
if (clientIds.includes(payload.sub)) {
|
|
36
|
+
await jwtVerify(jwtToCheck, publicKeyExported, {algorithms: ['RS256']});
|
|
37
|
+
} else {
|
|
38
|
+
await jwtVerify(jwtToCheck, publicKeyExported, {algorithms: ['RS256'], requiredClaims: ['admin']});
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
} catch (e) {
|
|
23
42
|
res.statusCode = 401;
|
|
24
43
|
res.json({code: 4, message: 'no or wrong API Key', data: null});
|
|
25
|
-
|
|
44
|
+
return false;
|
|
26
45
|
}
|
|
27
|
-
|
|
28
|
-
return valid;
|
|
29
46
|
};
|
|
30
47
|
|
|
31
48
|
const validateRequiredField =
|
|
@@ -70,7 +87,7 @@ const broadcastUrlFor = (endPoint) => {
|
|
|
70
87
|
|
|
71
88
|
/* ********** Available functions/values: ********** */
|
|
72
89
|
|
|
73
|
-
exports.
|
|
90
|
+
exports.validateAuth = validateAuth;
|
|
74
91
|
exports.validateRequiredFields = validateRequiredFields;
|
|
75
92
|
exports.sanitizePadId = sanitizePadId;
|
|
76
93
|
exports.broadcastUrlFor = broadcastUrlFor;
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
|
4
|
-
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
|
3
|
+
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool').default || require('ep_etherpad-lite/static/js/AttributePool');
|
|
4
|
+
const Changeset = require('ep_etherpad-lite/static/js/Changeset').default || require('ep_etherpad-lite/static/js/Changeset');
|
|
5
5
|
const eejs = require('ep_etherpad-lite/node/eejs/');
|
|
6
6
|
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
|
7
7
|
const {Formidable} = require('formidable');
|
|
@@ -9,7 +9,7 @@ const commentManager = require('./commentManager');
|
|
|
9
9
|
const apiUtils = require('./apiUtils');
|
|
10
10
|
const _ = require('underscore');
|
|
11
11
|
const padMessageHandler = require('ep_etherpad-lite/node/handler/PadMessageHandler');
|
|
12
|
-
const readOnlyManager = require('ep_etherpad-lite/node/db/ReadOnlyManager');
|
|
12
|
+
const readOnlyManager = require('ep_etherpad-lite/node/db/ReadOnlyManager').default || require('ep_etherpad-lite/node/db/ReadOnlyManager');
|
|
13
13
|
|
|
14
14
|
let io;
|
|
15
15
|
|
|
@@ -17,8 +17,8 @@ exports.exportEtherpadAdditionalContent = (hookName, context, callback) => callb
|
|
|
17
17
|
|
|
18
18
|
exports.padRemove = async (hookName, context) => {
|
|
19
19
|
await Promise.all([
|
|
20
|
-
commentManager.deleteCommentReplies(context.
|
|
21
|
-
commentManager.deleteComments(context.
|
|
20
|
+
commentManager.deleteCommentReplies(context.pad.id),
|
|
21
|
+
commentManager.deleteComments(context.pad.id),
|
|
22
22
|
]);
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -204,11 +204,8 @@ exports.clientVars = (hook, context, cb) => {
|
|
|
204
204
|
};
|
|
205
205
|
|
|
206
206
|
exports.expressCreateServer = (hookName, args, callback) => {
|
|
207
|
-
args.app.get('/p/:pad/:rev
|
|
208
|
-
|
|
209
|
-
// check the api key
|
|
210
|
-
if (!apiUtils.validateApiKey(fields, res)) return;
|
|
211
|
-
|
|
207
|
+
args.app.get('/p/:pad{/:rev}/comments', async (req, res) => {
|
|
208
|
+
if (!await apiUtils.validateAuth(req, res)) return;
|
|
212
209
|
// sanitize pad id before continuing
|
|
213
210
|
const padIdReceived = (await readOnlyManager.getIds(apiUtils.sanitizePadId(req))).padId;
|
|
214
211
|
|
|
@@ -224,13 +221,26 @@ exports.expressCreateServer = (hookName, args, callback) => {
|
|
|
224
221
|
res.json({code: 0, data});
|
|
225
222
|
});
|
|
226
223
|
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
// Helper that returns request fields from either req.body (when Etherpad's
|
|
225
|
+
// express body-parser middleware has already parsed JSON or urlencoded) or
|
|
226
|
+
// by parsing the raw body with Formidable (multipart/form-data uploads).
|
|
227
|
+
// Formidable v3 returns array values; flatten them so callers can use
|
|
228
|
+
// fields.data without indexing.
|
|
229
|
+
const parseRequestFields = async (req) => {
|
|
230
|
+
if (req.body && Object.keys(req.body).length > 0) return req.body;
|
|
231
|
+
const raw = await new Promise((resolve, reject) => {
|
|
229
232
|
new Formidable().parse(req, (err, fields) => err ? reject(err) : resolve(fields));
|
|
230
233
|
});
|
|
234
|
+
const flat = {};
|
|
235
|
+
for (const [k, v] of Object.entries(raw || {})) {
|
|
236
|
+
flat[k] = Array.isArray(v) ? v[0] : v;
|
|
237
|
+
}
|
|
238
|
+
return flat;
|
|
239
|
+
};
|
|
231
240
|
|
|
232
|
-
|
|
233
|
-
if (!apiUtils.
|
|
241
|
+
args.app.post('/p/:pad{/:rev}/comments', async (req, res) => {
|
|
242
|
+
if (!await apiUtils.validateAuth(req, res)) return;
|
|
243
|
+
const fields = await parseRequestFields(req);
|
|
234
244
|
|
|
235
245
|
// check required fields from comment data
|
|
236
246
|
if (!apiUtils.validateRequiredFields(fields, ['data'], res)) return;
|
|
@@ -262,12 +272,8 @@ exports.expressCreateServer = (hookName, args, callback) => {
|
|
|
262
272
|
res.json({code: 0, commentIds});
|
|
263
273
|
});
|
|
264
274
|
|
|
265
|
-
args.app.get('/p/:pad/:rev
|
|
266
|
-
|
|
267
|
-
const fields = req.query;
|
|
268
|
-
// check the api key
|
|
269
|
-
if (!apiUtils.validateApiKey(fields, res)) return;
|
|
270
|
-
|
|
275
|
+
args.app.get('/p/:pad{/:rev}/commentReplies', async (req, res) => {
|
|
276
|
+
if (!await apiUtils.validateAuth(req, res)) return;
|
|
271
277
|
// sanitize pad id before continuing
|
|
272
278
|
const padIdReceived = (await readOnlyManager.getIds(apiUtils.sanitizePadId(req))).padId;
|
|
273
279
|
|
|
@@ -284,13 +290,9 @@ exports.expressCreateServer = (hookName, args, callback) => {
|
|
|
284
290
|
res.json({code: 0, data});
|
|
285
291
|
});
|
|
286
292
|
|
|
287
|
-
args.app.post('/p/:pad/:rev
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
// check the api key
|
|
293
|
-
if (!apiUtils.validateApiKey(fields, res)) return;
|
|
293
|
+
args.app.post('/p/:pad{/:rev}/commentReplies', async (req, res) => {
|
|
294
|
+
if (!await apiUtils.validateAuth(req, res)) return;
|
|
295
|
+
const fields = await parseRequestFields(req);
|
|
294
296
|
|
|
295
297
|
// check required fields from comment data
|
|
296
298
|
if (!apiUtils.validateRequiredFields(fields, ['data'], res)) return;
|
package/locales/es.json
CHANGED
|
@@ -2,21 +2,30 @@
|
|
|
2
2
|
"@metadata": {
|
|
3
3
|
"authors": [
|
|
4
4
|
"Avengium",
|
|
5
|
-
"Jakeukalane"
|
|
5
|
+
"Jakeukalane",
|
|
6
|
+
"Ovruni"
|
|
6
7
|
]
|
|
7
8
|
},
|
|
8
9
|
"ep_comments_page.comment": "Comentario",
|
|
9
10
|
"ep_comments_page.comments": "Comentarios",
|
|
11
|
+
"ep_comments_page.add_comment.title": "Añadir nuevo comentario sobre la selección",
|
|
12
|
+
"ep_comments_page.add_comment": "Añadir nuevo comentario sobre la selección",
|
|
10
13
|
"ep_comments_page.add_comment.hint": "Primero selecciona el texto para comentar",
|
|
14
|
+
"ep_comments_page.delete_comment.title": "Eliminar este comentario",
|
|
11
15
|
"ep_comments_page.edit_comment.title": "Editar este comentario",
|
|
16
|
+
"ep_comments_page.show_comments": "Mostrar comentarios",
|
|
17
|
+
"ep_comments_page.comments_template.suggested_change": "Cambio sugerido",
|
|
18
|
+
"ep_comments_page.comments_template.from": "De",
|
|
12
19
|
"ep_comments_page.comments_template.accept_change.value": "Aceptar cambio",
|
|
13
20
|
"ep_comments_page.comments_template.revert_change.value": "Revertir cambio",
|
|
14
21
|
"ep_comments_page.comments_template.suggested_change_from": "Cambio sugerido de \"{{changeFrom}}\" a \"{{changeTo}}\"",
|
|
15
22
|
"ep_comments_page.comments_template.suggest_change_from": "Sugerir cambio de \"{{changeFrom}}\" a",
|
|
23
|
+
"ep_comments_page.comments_template.to": "Para",
|
|
16
24
|
"ep_comments_page.comments_template.include_suggestion": "Incluir cambio sugerido",
|
|
17
25
|
"ep_comments_page.comments_template.comment.value": "Comentario",
|
|
18
26
|
"ep_comments_page.comments_template.cancel.value": "Cancelar",
|
|
19
27
|
"ep_comments_page.comments_template.reply.value": "Responder",
|
|
28
|
+
"ep_comments_page.comments_template.reply.placeholder": "Responder",
|
|
20
29
|
"ep_comments_page.comments_template.edit_comment.save": "Guardar",
|
|
21
30
|
"ep_comments_page.comments_template.edit_comment.cancel": "cancelar",
|
|
22
31
|
"ep_comments_page.error.edit_unauth": "¡No puedes editar los comentarios de otros usuarios!",
|
package/locales/fr.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@metadata": {
|
|
3
3
|
"authors": [
|
|
4
|
+
"Meaz",
|
|
4
5
|
"Verdy p"
|
|
5
6
|
]
|
|
6
7
|
},
|
|
7
8
|
"ep_comments_page.comment": "Annotation",
|
|
8
9
|
"ep_comments_page.comments": "Annotations",
|
|
9
|
-
"ep_comments_page.add_comment.title": "
|
|
10
|
-
"ep_comments_page.add_comment": "
|
|
11
|
-
"ep_comments_page.add_comment.hint": "Vous devez d'abord sélectionner un texte à
|
|
12
|
-
"ep_comments_page.delete_comment.title": "Supprimer
|
|
13
|
-
"ep_comments_page.edit_comment.title": "Modifier
|
|
14
|
-
"ep_comments_page.show_comments": "Afficher
|
|
10
|
+
"ep_comments_page.add_comment.title": "Ajouter un nouveau commentaire sur la sélection",
|
|
11
|
+
"ep_comments_page.add_comment": "Ajouter un nouveau commentaire sur la sélection",
|
|
12
|
+
"ep_comments_page.add_comment.hint": "Vous devez d'abord sélectionner un texte à commenter",
|
|
13
|
+
"ep_comments_page.delete_comment.title": "Supprimer ce commentaire",
|
|
14
|
+
"ep_comments_page.edit_comment.title": "Modifier ce commentaire",
|
|
15
|
+
"ep_comments_page.show_comments": "Afficher le commentaire",
|
|
15
16
|
"ep_comments_page.comments_template.suggested_change": "Modification proposée",
|
|
16
17
|
"ep_comments_page.comments_template.from": "Remplacer",
|
|
17
18
|
"ep_comments_page.comments_template.accept_change.value": "Appliquer la proposition",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"ep_comments_page.comments_template.suggest_change_from": "Remplacer « {{changeFrom}} » par",
|
|
21
22
|
"ep_comments_page.comments_template.to": "Par",
|
|
22
23
|
"ep_comments_page.comments_template.include_suggestion": "Inclure la modification suggérée",
|
|
23
|
-
"ep_comments_page.comments_template.comment.value": "
|
|
24
|
+
"ep_comments_page.comments_template.comment.value": "Commentaire",
|
|
24
25
|
"ep_comments_page.comments_template.cancel.value": "Annuler",
|
|
25
26
|
"ep_comments_page.comments_template.reply.value": "Répondre",
|
|
26
27
|
"ep_comments_page.comments_template.reply.placeholder": "Répondre",
|
package/locales/ga.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"Aindriu80"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "Trácht",
|
|
8
|
+
"ep_comments_page.comments": "Tráchtanna",
|
|
9
|
+
"ep_comments_page.add_comment.title": "Cuir trácht nua leis an rogha",
|
|
10
|
+
"ep_comments_page.add_comment": "Cuir trácht nua leis an rogha",
|
|
11
|
+
"ep_comments_page.add_comment.hint": "Roghnaigh an téacs le trácht a dhéanamh air ar dtús",
|
|
12
|
+
"ep_comments_page.delete_comment.title": "Scrios an trácht seo",
|
|
13
|
+
"ep_comments_page.edit_comment.title": "Cuir an trácht seo in eagar",
|
|
14
|
+
"ep_comments_page.show_comments": "Taispeáin Tráchtanna",
|
|
15
|
+
"ep_comments_page.comments_template.suggested_change": "Athrú Molta",
|
|
16
|
+
"ep_comments_page.comments_template.from": "Ó",
|
|
17
|
+
"ep_comments_page.comments_template.accept_change.value": "Glac leis an Athrú",
|
|
18
|
+
"ep_comments_page.comments_template.revert_change.value": "Athraigh a Chur Ar Ais",
|
|
19
|
+
"ep_comments_page.comments_template.suggested_change_from": "Athrú molta ó \"{{changeFrom}}\" go \"{{changeTo}}\"",
|
|
20
|
+
"ep_comments_page.comments_template.suggest_change_from": "Mol athrú ó \"{{changeFrom}}\" go",
|
|
21
|
+
"ep_comments_page.comments_template.to": "Chuig",
|
|
22
|
+
"ep_comments_page.comments_template.include_suggestion": "Cuir an t-athrú molta san áireamh",
|
|
23
|
+
"ep_comments_page.comments_template.comment.value": "Trácht",
|
|
24
|
+
"ep_comments_page.comments_template.cancel.value": "Cealaigh",
|
|
25
|
+
"ep_comments_page.comments_template.reply.value": "Freagra",
|
|
26
|
+
"ep_comments_page.comments_template.reply.placeholder": "Freagra",
|
|
27
|
+
"ep_comments_page.comments_template.edit_comment.save": "sábháil",
|
|
28
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "cealaigh",
|
|
29
|
+
"ep_comments_page.error.edit_unauth": "Ní féidir leat tuairimí úsáideoirí eile a chur in eagar!",
|
|
30
|
+
"ep_comments_page.error.delete_unauth": "Ní féidir leat tuairimí úsáideoirí eile a scriosadh!"
|
|
31
|
+
}
|
package/locales/got.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"Gothicspeaker"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "𐍅𐌰𐌿𐍂𐌳",
|
|
8
|
+
"ep_comments_page.comments": "𐍅𐌰𐌿𐍂𐌳𐌰",
|
|
9
|
+
"ep_comments_page.comments_template.to": "𐌳𐌿",
|
|
10
|
+
"ep_comments_page.comments_template.cancel.value": "𐌱𐌹𐍅𐌰𐌽𐌳𐌾𐌰𐌽",
|
|
11
|
+
"ep_comments_page.comments_template.reply.value": "𐌰𐌽𐌳𐌷𐌰𐍆𐌾𐌰𐌽",
|
|
12
|
+
"ep_comments_page.comments_template.reply.placeholder": "𐌰𐌽𐌳𐌷𐌰𐍆𐌾𐌰𐌽",
|
|
13
|
+
"ep_comments_page.comments_template.edit_comment.save": "𐌲𐌰𐍆𐌰𐍃𐍄𐌰𐌽",
|
|
14
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "𐌱𐌹𐍅𐌰𐌽𐌳𐌾𐌰𐌽"
|
|
15
|
+
}
|
package/locales/hu.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@metadata": {
|
|
3
|
-
"authors": [
|
|
3
|
+
"authors": [
|
|
4
|
+
"Urbalazs"
|
|
5
|
+
]
|
|
4
6
|
},
|
|
5
7
|
"ep_comments_page.comment": "Megjegyzés",
|
|
6
8
|
"ep_comments_page.comments": "Megjegyzések",
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
"ep_comments_page.comments_template.to": "Címzett:",
|
|
20
22
|
"ep_comments_page.comments_template.include_suggestion": "Javasolt változtatás tartalmazása",
|
|
21
23
|
"ep_comments_page.comments_template.comment.value": "Megjegyzés",
|
|
22
|
-
"ep_comments_page.comments_template.cancel.value": "
|
|
24
|
+
"ep_comments_page.comments_template.cancel.value": "Mégse",
|
|
23
25
|
"ep_comments_page.comments_template.reply.value": "Válasz",
|
|
24
26
|
"ep_comments_page.comments_template.reply.placeholder": "Válasz",
|
|
25
27
|
"ep_comments_page.comments_template.edit_comment.save": "mentés",
|
package/locales/kaa.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"Inabat Allanova"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "Pikir",
|
|
8
|
+
"ep_comments_page.comments": "Pikirler",
|
|
9
|
+
"ep_comments_page.add_comment.title": "Tańlawǵa jańa pikir qosıw",
|
|
10
|
+
"ep_comments_page.add_comment": "Tańlawǵa jańa pikir qosıw",
|
|
11
|
+
"ep_comments_page.add_comment.hint": "Dáslep, pikir jazıw ushın tekstti tańlań",
|
|
12
|
+
"ep_comments_page.delete_comment.title": "Pikirdi óshiriw",
|
|
13
|
+
"ep_comments_page.edit_comment.title": "Pikirdi redaktorlaw",
|
|
14
|
+
"ep_comments_page.show_comments": "Pikirlerdi kórsetiw",
|
|
15
|
+
"ep_comments_page.comments_template.suggested_change": "Usınılǵan ózgeris",
|
|
16
|
+
"ep_comments_page.comments_template.from": "Usıdan baslap:",
|
|
17
|
+
"ep_comments_page.comments_template.accept_change.value": "Ózgeristi qabıl etiw",
|
|
18
|
+
"ep_comments_page.comments_template.revert_change.value": "Ózgeristi qaytarıw",
|
|
19
|
+
"ep_comments_page.comments_template.suggested_change_from": "«{{changeFrom}}»tan «{{changeTo}}»qa ózgertiw usınıs etildi",
|
|
20
|
+
"ep_comments_page.comments_template.suggest_change_from": "«{{changeFrom}}» ornına basqasın usınıs etiń",
|
|
21
|
+
"ep_comments_page.comments_template.to": "Usıǵan shekem",
|
|
22
|
+
"ep_comments_page.comments_template.include_suggestion": "Usınılǵan ózgeristi kirgiziw",
|
|
23
|
+
"ep_comments_page.comments_template.comment.value": "Pikir",
|
|
24
|
+
"ep_comments_page.comments_template.cancel.value": "Biykarlaw",
|
|
25
|
+
"ep_comments_page.comments_template.reply.value": "Juwap beriw",
|
|
26
|
+
"ep_comments_page.comments_template.reply.placeholder": "Juwap beriw",
|
|
27
|
+
"ep_comments_page.comments_template.edit_comment.save": "saqlaw",
|
|
28
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "biykarlaw",
|
|
29
|
+
"ep_comments_page.error.edit_unauth": "Siz basqa paydalanıwshılardıń pikirlerin redaktorlay almaysız!",
|
|
30
|
+
"ep_comments_page.error.delete_unauth": "Siz basqa paydalanıwshılardıń pikirlerin óshire almaysız!"
|
|
31
|
+
}
|
package/locales/kab.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"ButterflyOfFire"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "Awennit",
|
|
8
|
+
"ep_comments_page.comments": "Iwenniten",
|
|
9
|
+
"ep_comments_page.comments_template.cancel.value": "Semmet",
|
|
10
|
+
"ep_comments_page.comments_template.reply.value": "Tiririt",
|
|
11
|
+
"ep_comments_page.comments_template.reply.placeholder": "Tiririt",
|
|
12
|
+
"ep_comments_page.comments_template.edit_comment.save": "sekles",
|
|
13
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "semmet"
|
|
14
|
+
}
|
package/locales/ko.json
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"authors": [
|
|
4
4
|
"Dr1t jg",
|
|
5
5
|
"Ykhwong",
|
|
6
|
-
"그냥기여자"
|
|
6
|
+
"그냥기여자",
|
|
7
|
+
"아라"
|
|
7
8
|
]
|
|
8
9
|
},
|
|
9
10
|
"ep_comments_page.comment": "의견",
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
"ep_comments_page.delete_comment.title": "이 의견 삭제",
|
|
15
16
|
"ep_comments_page.edit_comment.title": "이 의견 편집하기",
|
|
16
17
|
"ep_comments_page.show_comments": "의견 표시",
|
|
17
|
-
"ep_comments_page.comments_template.suggested_change": "제안된
|
|
18
|
+
"ep_comments_page.comments_template.suggested_change": "제안된 변경사항",
|
|
18
19
|
"ep_comments_page.comments_template.from": "출발지",
|
|
19
20
|
"ep_comments_page.comments_template.accept_change.value": "변경 수락",
|
|
20
21
|
"ep_comments_page.comments_template.revert_change.value": "변경사항 되돌리기",
|
package/locales/lb.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@metadata": {
|
|
3
3
|
"authors": [
|
|
4
|
-
"Robby"
|
|
4
|
+
"Robby",
|
|
5
|
+
"Volvox"
|
|
5
6
|
]
|
|
6
7
|
},
|
|
7
8
|
"ep_comments_page.comment": "Bemierkung",
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
"ep_comments_page.comments_template.suggested_change": "Proposéiert Ännerung",
|
|
13
14
|
"ep_comments_page.comments_template.from": "Vum",
|
|
14
15
|
"ep_comments_page.comments_template.accept_change.value": "Ännerung akzeptéieren",
|
|
15
|
-
"ep_comments_page.comments_template.revert_change.value": "Ännerung
|
|
16
|
+
"ep_comments_page.comments_template.revert_change.value": "Ännerung zerécksetzen",
|
|
16
17
|
"ep_comments_page.comments_template.to": "Fir",
|
|
17
18
|
"ep_comments_page.comments_template.comment.value": "Bemierkung",
|
|
18
19
|
"ep_comments_page.comments_template.cancel.value": "Ofbriechen",
|
package/locales/nl.json
CHANGED
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"ep_comments_page.comments_template.reply.placeholder": "Antwoord",
|
|
27
27
|
"ep_comments_page.comments_template.edit_comment.save": "bewaar",
|
|
28
28
|
"ep_comments_page.comments_template.edit_comment.cancel": "annuleer",
|
|
29
|
-
"ep_comments_page.error.edit_unauth": "
|
|
30
|
-
"ep_comments_page.error.delete_unauth": "
|
|
29
|
+
"ep_comments_page.error.edit_unauth": "U kunt de opmerkingen van andere gebruikers niet bewerken!",
|
|
30
|
+
"ep_comments_page.error.delete_unauth": "U kunt de opmerkingen van andere gebruikers niet verwijderen!"
|
|
31
31
|
}
|
package/locales/pa.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"Cabal"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comments": "ਟਿੱਪਣੀਆਂ",
|
|
8
|
+
"ep_comments_page.comments_template.from": "ਵੱਲੋਂ",
|
|
9
|
+
"ep_comments_page.comments_template.accept_change.value": "ਤਬਦੀਲੀ ਸਵੀਕਾਰੋ",
|
|
10
|
+
"ep_comments_page.comments_template.cancel.value": "ਰੱਦ ਕਰੋ",
|
|
11
|
+
"ep_comments_page.comments_template.reply.value": "ਜੁਆਬ ਦਿਓ",
|
|
12
|
+
"ep_comments_page.comments_template.reply.placeholder": "ਜੁਆਬ ਦਿਓ",
|
|
13
|
+
"ep_comments_page.comments_template.edit_comment.save": "ਸਾਂਭੋ",
|
|
14
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "ਰੱਦ ਕਰੋ"
|
|
15
|
+
}
|
package/locales/pl.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@metadata": {
|
|
3
|
-
"authors": [
|
|
3
|
+
"authors": [
|
|
4
|
+
"Usagi.02808"
|
|
5
|
+
]
|
|
4
6
|
},
|
|
5
7
|
"ep_comments_page.comment": "Komentarz",
|
|
6
8
|
"ep_comments_page.comments": "Komentarze",
|
|
7
|
-
"ep_comments_page.add_comment.title": "Dodaj nowy komentarz do
|
|
8
|
-
"ep_comments_page.add_comment": "Dodaj nowy komentarz do
|
|
9
|
+
"ep_comments_page.add_comment.title": "Dodaj nowy komentarz do zaznaczonego tekstu",
|
|
10
|
+
"ep_comments_page.add_comment": "Dodaj nowy komentarz do zaznaczonego tekstu",
|
|
9
11
|
"ep_comments_page.add_comment.hint": "Najpierw wybierz tekst do skomentowania",
|
|
10
12
|
"ep_comments_page.delete_comment.title": "Usuń komentarz",
|
|
11
|
-
"ep_comments_page.edit_comment.title": "
|
|
13
|
+
"ep_comments_page.edit_comment.title": "Edytuj ten komentarz",
|
|
12
14
|
"ep_comments_page.show_comments": "Pokaż komentarze",
|
|
13
|
-
"ep_comments_page.comments_template.suggested_change": "
|
|
15
|
+
"ep_comments_page.comments_template.suggested_change": "Sugerowana zmiana",
|
|
14
16
|
"ep_comments_page.comments_template.from": "Od",
|
|
15
17
|
"ep_comments_page.comments_template.accept_change.value": "Zaakceptuj zmiany",
|
|
16
18
|
"ep_comments_page.comments_template.revert_change.value": "Przywróc zmiany",
|
|
17
|
-
"ep_comments_page.comments_template.suggested_change_from": "Sugerowana zmiana z",
|
|
18
|
-
"ep_comments_page.comments_template.suggest_change_from": "Zaproponuj
|
|
19
|
+
"ep_comments_page.comments_template.suggested_change_from": "Sugerowana zmiana z „{{changeFrom}}” na „{{changeTo}}”",
|
|
20
|
+
"ep_comments_page.comments_template.suggest_change_from": "Zaproponuj zmianę z „{{changeFrom}}” na",
|
|
19
21
|
"ep_comments_page.comments_template.to": "Do",
|
|
20
22
|
"ep_comments_page.comments_template.include_suggestion": "Dołącz sugestie",
|
|
21
23
|
"ep_comments_page.comments_template.comment.value": "Komentarz",
|
|
@@ -24,6 +26,6 @@
|
|
|
24
26
|
"ep_comments_page.comments_template.reply.placeholder": "Odpowiedź",
|
|
25
27
|
"ep_comments_page.comments_template.edit_comment.save": "save",
|
|
26
28
|
"ep_comments_page.comments_template.edit_comment.cancel": "cancel",
|
|
27
|
-
"ep_comments_page.error.edit_unauth": "
|
|
28
|
-
"ep_comments_page.error.delete_unauth": "
|
|
29
|
+
"ep_comments_page.error.edit_unauth": "Nie możesz edytować komentarzy innych użytkowników!",
|
|
30
|
+
"ep_comments_page.error.delete_unauth": "Nie możesz usuwać komentarzy innych użytkowników!"
|
|
29
31
|
}
|
package/locales/pms.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"Borichèt"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "Coment",
|
|
8
|
+
"ep_comments_page.comments": "Coment",
|
|
9
|
+
"ep_comments_page.add_comment.title": "Gionté un coment neuv an sla selession",
|
|
10
|
+
"ep_comments_page.add_comment": "Gionté un coment neuv an sla selession",
|
|
11
|
+
"ep_comments_page.add_comment.hint": "Për piasì, prima ch'a serna ël test da comenté",
|
|
12
|
+
"ep_comments_page.delete_comment.title": "Eliminé cost coment",
|
|
13
|
+
"ep_comments_page.edit_comment.title": "Modifiché cost coment",
|
|
14
|
+
"ep_comments_page.show_comments": "Smon-e ij coment",
|
|
15
|
+
"ep_comments_page.comments_template.suggested_change": "Modìfiche proponùe",
|
|
16
|
+
"ep_comments_page.comments_template.from": "Da",
|
|
17
|
+
"ep_comments_page.comments_template.accept_change.value": "Aceté la modìfica",
|
|
18
|
+
"ep_comments_page.comments_template.revert_change.value": "Anulé la modìfica",
|
|
19
|
+
"ep_comments_page.comments_template.suggested_change_from": "Propon-e ëd rampiassé «{{changeFrom}}» con «{{changeTo}}»",
|
|
20
|
+
"ep_comments_page.comments_template.suggest_change_from": "Propon-e ëd rampiassé «{{changeFrom}}» con",
|
|
21
|
+
"ep_comments_page.comments_template.to": "A",
|
|
22
|
+
"ep_comments_page.comments_template.include_suggestion": "Anclude la modìfica sugerìa",
|
|
23
|
+
"ep_comments_page.comments_template.comment.value": "Coment",
|
|
24
|
+
"ep_comments_page.comments_template.cancel.value": "Anulé",
|
|
25
|
+
"ep_comments_page.comments_template.reply.value": "Rësponde",
|
|
26
|
+
"ep_comments_page.comments_template.reply.placeholder": "Rësponde",
|
|
27
|
+
"ep_comments_page.comments_template.edit_comment.save": "argistré",
|
|
28
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "anulé",
|
|
29
|
+
"ep_comments_page.error.edit_unauth": "A peul pa modifiché ij coment dj'àutri utent!",
|
|
30
|
+
"ep_comments_page.error.delete_unauth": "A peul nen dëscancelé ij coment ëd j'àutri utent!"
|
|
31
|
+
}
|
package/locales/ps.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"شاه زمان پټان"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "څرگندونه",
|
|
8
|
+
"ep_comments_page.comments": "څرگندونې",
|
|
9
|
+
"ep_comments_page.add_comment.title": "په ټاکنې کې نوې څرگندونه ورگډول",
|
|
10
|
+
"ep_comments_page.add_comment": "په ټاکنې کې نوې څرگندونه ورگډول",
|
|
11
|
+
"ep_comments_page.add_comment.hint": "مهرباني وکړئ د څرگندونې لپاره لومړی ليکنه وټاکئ",
|
|
12
|
+
"ep_comments_page.delete_comment.title": "دا څرگندونه ړنگول",
|
|
13
|
+
"ep_comments_page.edit_comment.title": "دا څرگندونه سمول",
|
|
14
|
+
"ep_comments_page.show_comments": "څرگندونې ښودل",
|
|
15
|
+
"ep_comments_page.comments_template.suggested_change": "وړانديزشوی بدلون",
|
|
16
|
+
"ep_comments_page.comments_template.from": "له",
|
|
17
|
+
"ep_comments_page.comments_template.accept_change.value": "بدلون منل",
|
|
18
|
+
"ep_comments_page.comments_template.revert_change.value": "بدلون پهڅټگرځول",
|
|
19
|
+
"ep_comments_page.comments_template.to": "ته",
|
|
20
|
+
"ep_comments_page.comments_template.include_suggestion": "وړانديزشوی بدلون رانغاړل",
|
|
21
|
+
"ep_comments_page.comments_template.comment.value": "څرگندونه",
|
|
22
|
+
"ep_comments_page.comments_template.cancel.value": "ناگارل",
|
|
23
|
+
"ep_comments_page.comments_template.reply.value": "ځوابول",
|
|
24
|
+
"ep_comments_page.comments_template.reply.placeholder": "ځوابول",
|
|
25
|
+
"ep_comments_page.comments_template.edit_comment.save": "خوندي کول",
|
|
26
|
+
"ep_comments_page.comments_template.edit_comment.cancel": "ناگارل",
|
|
27
|
+
"ep_comments_page.error.edit_unauth": "تاسو د نورو کارنانو څرگندونې نشئ سمولی!",
|
|
28
|
+
"ep_comments_page.error.delete_unauth": "تاسو د نورو کارنانو څرگندونې نشئ ړنگولی!"
|
|
29
|
+
}
|
package/locales/ro.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@metadata": {
|
|
3
|
+
"authors": [
|
|
4
|
+
"SZ475"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"ep_comments_page.comment": "Comentează",
|
|
8
|
+
"ep_comments_page.comments": "Comentarii",
|
|
9
|
+
"ep_comments_page.comments_template.from": "De la",
|
|
10
|
+
"ep_comments_page.comments_template.accept_change.value": "Acceptă schimbarea",
|
|
11
|
+
"ep_comments_page.comments_template.revert_change.value": "Anulează schimbarea",
|
|
12
|
+
"ep_comments_page.comments_template.to": "Către",
|
|
13
|
+
"ep_comments_page.error.edit_unauth": "Nu poți edita comentariile altor utilizatori!",
|
|
14
|
+
"ep_comments_page.error.delete_unauth": "Nu poți șterge comentariile altor utilizatori!"
|
|
15
|
+
}
|
package/locales/sq.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Adds comments on sidebar and link it to the text. For no-skin use ep_page_view.",
|
|
3
3
|
"name": "ep_comments_page",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.41",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Nicolas Lescop",
|
|
7
7
|
"email": "limplementeur@gmail.com"
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"cheerio": "^1.
|
|
26
|
-
"formidable": "^3.5.
|
|
27
|
-
"underscore": "^1.13.
|
|
25
|
+
"cheerio": "^1.2.0",
|
|
26
|
+
"formidable": "^3.5.4",
|
|
27
|
+
"underscore": "^1.13.8"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"eslint": "^8.57.
|
|
30
|
+
"eslint": "^8.57.1",
|
|
31
31
|
"eslint-config-etherpad": "^4.0.4",
|
|
32
|
-
"socket.io-client": "
|
|
33
|
-
"superagent": "^
|
|
34
|
-
"typescript": "^
|
|
32
|
+
"socket.io-client": "^4.8.3",
|
|
33
|
+
"superagent": "^10.3.0",
|
|
34
|
+
"typescript": "^6.0.2"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=18.0.0"
|
package/static/js/index.js
CHANGED
|
@@ -791,10 +791,10 @@ EpComments.prototype.getCommentData = function () {
|
|
|
791
791
|
|
|
792
792
|
// Delete a pad comment
|
|
793
793
|
EpComments.prototype.deleteComment = function (commentId) {
|
|
794
|
-
while($('iframe[name="ace_outer"]').contents().find(`#${commentId}`).length > 0){
|
|
794
|
+
while ($('iframe[name="ace_outer"]').contents().find(`#${commentId}`).length > 0) {
|
|
795
795
|
$('iframe[name="ace_outer"]').contents().find(`#${commentId}`).remove();
|
|
796
796
|
}
|
|
797
|
-
while($('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).length > 0){
|
|
797
|
+
while ($('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).length > 0) {
|
|
798
798
|
$('iframe[name="ace_outer"]').contents().find(`#icon-${commentId}`).remove();
|
|
799
799
|
}
|
|
800
800
|
};
|