@nodebb/nodebb-plugin-reactions 2.1.10 → 2.1.12
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/languages/tr/reactions.json +23 -0
- package/library.js +20 -8
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"reactions": "Tepkiler",
|
|
3
|
+
"add-reaction": "Tepki ekle",
|
|
4
|
+
"error.invalid-reaction": "Geçersiz tepki",
|
|
5
|
+
"error.maximum-reached": "Verilebilecek en fazla sayıda tepkiye ulaşıldı",
|
|
6
|
+
"error.maximum-per-user-per-post-reached": "Bir kullanıcıya iletisi için verilebilecek en fazla sayıda tepkiye ulaşıldı",
|
|
7
|
+
"settings.title": "Tepkiler eklentisi ayarları",
|
|
8
|
+
"settings.enable-post-reactions": "İleti tepkilerini aktifleştir",
|
|
9
|
+
"settings.max-reactions-per-post": "Her iletiye verilebilecek en fazla sayıda farklı tepki (sınırsız için 0 seçiniz, varsayılan: 4)",
|
|
10
|
+
"settings.max-reactions-per-user-per-post": "Bir kullanıcının bir iletiye verebileceği en fazla sayıda tepki (sınırsız için 0 seçiniz)",
|
|
11
|
+
"settings.max-reactions-per-user-per-post-help": "Sayı limiti sadece iletiye farklı ve yeni bir tepki eklenirken uygulanır.",
|
|
12
|
+
"settings.enable-message-reactions": "Sohbet tepkilerini etkinleştir",
|
|
13
|
+
"settings.max-reactions-per-message": "Her mesaja verilebilecek en fazla sayıda farklı tepki (sınırsız için 0 seçiniz, varsayılan: 4)",
|
|
14
|
+
"settings.max-reactions-per-user-per-message": "Bir kullanıcının bir mesaja verebileceği en fazla sayıda tepki (sınırsız için 0 seçiniz)",
|
|
15
|
+
"settings.max-reactions-per-user-per-message-help": "Sayı limiti sadece mesaja farklı ve yeni bir tepki eklenirken uygulanır.",
|
|
16
|
+
"settings.reaction-reputations": "Tepki Saygınlıkları (İsteğe bağlı)",
|
|
17
|
+
"settings.reaction-reputations-help": "Her tepkiye bir saygınlık puanı atayabilirsiniz. İletiye tepki verildiğinde, kullanıcı bu saygınlık puanını alır.",
|
|
18
|
+
"settings.reaction-reputations.add": "Kural ekle",
|
|
19
|
+
"settings.reaction-reputations.reaction": "Tepki",
|
|
20
|
+
"settings.reaction-reputations.reputation": "Saygınlık",
|
|
21
|
+
"settings.reaction-reputations.remove": "Sil",
|
|
22
|
+
"settings.reaction-reputations.edit": "Düzenle"
|
|
23
|
+
}
|
package/library.js
CHANGED
|
@@ -11,13 +11,25 @@ const websockets = require.main.require('./src/socket.io/index');
|
|
|
11
11
|
const SocketPlugins = require.main.require('./src/socket.io/plugins');
|
|
12
12
|
|
|
13
13
|
const emojiParser = require.main.require('nodebb-plugin-emoji/build/lib/parse.js');
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
let emojiTable = null;
|
|
16
|
+
let emojiAliases = null;
|
|
16
17
|
|
|
17
18
|
const DEFAULT_MAX_EMOTES = 4;
|
|
18
19
|
|
|
20
|
+
function nameToEmoji(name) {
|
|
21
|
+
if (!emojiTable) {
|
|
22
|
+
emojiTable = require.main.require('nodebb-plugin-emoji/build/emoji/table.json');
|
|
23
|
+
}
|
|
24
|
+
return emojiTable[name];
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
function parse(name) {
|
|
20
|
-
|
|
28
|
+
if (!emojiAliases) {
|
|
29
|
+
emojiAliases = require.main.require('nodebb-plugin-emoji/build/emoji/aliases.json');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return emojiParser.buildEmoji(nameToEmoji(name) || emojiTable[emojiAliases[name]], '');
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
const ReactionsPlugin = module.exports;
|
|
@@ -295,7 +307,7 @@ SocketPlugins.reactions = {
|
|
|
295
307
|
throw new Error('[[error:not-logged-in]]');
|
|
296
308
|
}
|
|
297
309
|
|
|
298
|
-
if (!
|
|
310
|
+
if (!nameToEmoji(data.reaction)) {
|
|
299
311
|
throw new Error('[[reactions:error.invalid-reaction]]');
|
|
300
312
|
}
|
|
301
313
|
|
|
@@ -349,7 +361,7 @@ SocketPlugins.reactions = {
|
|
|
349
361
|
throw new Error('[[error:not-logged-in]]');
|
|
350
362
|
}
|
|
351
363
|
|
|
352
|
-
if (!
|
|
364
|
+
if (!nameToEmoji(data.reaction)) {
|
|
353
365
|
throw new Error('[[reactions:error.invalid-reaction]]');
|
|
354
366
|
}
|
|
355
367
|
|
|
@@ -387,7 +399,7 @@ SocketPlugins.reactions = {
|
|
|
387
399
|
throw new Error('[[error:not-logged-in]]');
|
|
388
400
|
}
|
|
389
401
|
|
|
390
|
-
if (!
|
|
402
|
+
if (!nameToEmoji(data.reaction)) {
|
|
391
403
|
throw new Error('[[reactions:error.invalid-reaction]]');
|
|
392
404
|
}
|
|
393
405
|
|
|
@@ -438,7 +450,7 @@ SocketPlugins.reactions = {
|
|
|
438
450
|
throw new Error('[[error:not-logged-in]]');
|
|
439
451
|
}
|
|
440
452
|
|
|
441
|
-
if (!
|
|
453
|
+
if (!nameToEmoji(data.reaction)) {
|
|
442
454
|
throw new Error('[[reactions:error.invalid-reaction]]');
|
|
443
455
|
}
|
|
444
456
|
|
|
@@ -470,7 +482,7 @@ SocketPlugins.reactions = {
|
|
|
470
482
|
if (!socket.uid) {
|
|
471
483
|
throw new Error('[[error:not-logged-in]]');
|
|
472
484
|
}
|
|
473
|
-
if (!
|
|
485
|
+
if (!nameToEmoji(data.reaction)) {
|
|
474
486
|
throw new Error('[[reactions:error.invalid-reaction]]');
|
|
475
487
|
}
|
|
476
488
|
let set = '';
|