@nodebb/nodebb-plugin-reactions 3.0.1 → 3.0.2

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/assets/acp.png CHANGED
Binary file
@@ -2,8 +2,11 @@
2
2
  "reactions": "Reaktionen",
3
3
  "add-reaction": "Reaktion hinzufügen",
4
4
  "error.invalid-reaction": "Ungültige Reaktion",
5
- "error.maximum-reached": "Maximale Reaktionen erreicht",
6
- "error.maximum-per-user-per-post-reached": "Maximale Reaktionen pro Nutzer und Beitrag erreicht",
5
+ "error.maximum-reached": "Maximale Reaktionen erreicht: %1",
6
+ "error.maximum-per-user-per-post-reached": "Maximale Reaktionen pro Nutzer und Beitrag erreicht: %1",
7
+ "error.maximum-per-user-per-message-reached": "Maximale Reaktionen pro Nutzer und Nachricht erreicht: %1",
8
+ "error.post-reactions-disabled": "Reaktionen auf Beiträge sind deaktiviert",
9
+ "error.message-reactions-disabled": "Reaktionen auf Nachrichten sind deaktiviert",
7
10
  "settings.title": "Plugin-Einstellungen für Reaktionen",
8
11
  "settings.enable-post-reactions": "Reaktionen auf Posts aktivieren",
9
12
  "settings.max-reactions-per-post": "Maximale eindeutige Reaktionen pro Beitrag (0 für unbegrenzt, Standard: 4)",
@@ -22,4 +25,4 @@
22
25
  "settings.reaction-reputations.edit": "Bearbeiten",
23
26
  "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> hat mit %2 auf deinen Beitrag in <strong>%3</strong> reagiert",
24
27
  "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> hat mit %2 auf deine Nachricht in <strong class=\"text-nowrap\"><i class=\"fa %3\"></i>%4</strong> reagiert"
25
- }
28
+ }
@@ -1,25 +1,28 @@
1
1
  {
2
- "reactions": "Reactions",
3
- "add-reaction": "Add reaction",
4
- "error.invalid-reaction": "Invalid reaction",
5
- "error.maximum-reached": "Maximum reactions reached",
6
- "error.maximum-per-user-per-post-reached": "Maximum reactions per user per post reached",
7
- "settings.title": "Reactions plugin settings",
8
- "settings.enable-post-reactions": "Enable post reactions",
9
- "settings.max-reactions-per-post": "Maximum unique reactions per post (0 for unlimited, default: 4)",
10
- "settings.max-reactions-per-user-per-post": "Maximum reactions per user per post (0 for unlimited)",
11
- "settings.max-reactions-per-user-per-post-help": "The limit is enforced only when adding a new reaction and not when joining an existing reaction.",
12
- "settings.enable-message-reactions": "Enable message reactions",
13
- "settings.max-reactions-per-message": "Maximum unique reactions per message (0 for unlimited, default: 4)",
14
- "settings.max-reactions-per-user-per-message": "Maximum reactions per user per message (0 for unlimited)",
15
- "settings.max-reactions-per-user-per-message-help": "The limit is enforced only when adding a new reaction and not when joining an existing reaction.",
16
- "settings.reaction-reputations": "Reaction Reputations (Optional)",
17
- "settings.reaction-reputations-help": "You can assign a reputation to individual reactions. When a reaction is applied to a post, the owner of that post will get this reputation.",
18
- "settings.reaction-reputations.add": "Add Rule",
19
- "settings.reaction-reputations.reaction": "Reaction",
20
- "settings.reaction-reputations.reputation": "Reputation",
21
- "settings.reaction-reputations.remove": "Delete",
22
- "settings.reaction-reputations.edit": "Edit",
23
- "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> has reacted with %2 to your post in <strong>%3</strong>",
24
- "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> has reacted with %2 to your message in <strong class=\"text-nowrap\"><i class=\"fa %3\"></i> %4</strong>"
2
+ "reactions": "Reactions",
3
+ "add-reaction": "Add reaction",
4
+ "error.invalid-reaction": "Invalid reaction",
5
+ "error.maximum-reached": "Maximum reactions reached: %1",
6
+ "error.maximum-per-user-per-post-reached": "Maximum reactions per user per post reached: %1",
7
+ "error.maximum-per-user-per-message-reached": "Maximum reactions per user per message reached: %1",
8
+ "error.post-reactions-disabled": "Post reactions are disabled",
9
+ "error.message-reactions-disabled": "Message reactions are disabled",
10
+ "settings.title": "Reactions plugin settings",
11
+ "settings.enable-post-reactions": "Enable post reactions",
12
+ "settings.max-reactions-per-post": "Maximum unique reactions per post (0 for unlimited, default: 4)",
13
+ "settings.max-reactions-per-user-per-post": "Maximum reactions per user per post (0 for unlimited)",
14
+ "settings.max-reactions-per-user-per-post-help": "The limit is enforced only when adding a new reaction and not when joining an existing reaction.",
15
+ "settings.enable-message-reactions": "Enable message reactions",
16
+ "settings.max-reactions-per-message": "Maximum unique reactions per message (0 for unlimited, default: 4)",
17
+ "settings.max-reactions-per-user-per-message": "Maximum reactions per user per message (0 for unlimited)",
18
+ "settings.max-reactions-per-user-per-message-help": "The limit is enforced only when adding a new reaction and not when joining an existing reaction.",
19
+ "settings.reaction-reputations": "Reaction Reputations (Optional)",
20
+ "settings.reaction-reputations-help": "You can assign a reputation to individual reactions. When a reaction is applied to a post, the owner of that post will get this reputation.",
21
+ "settings.reaction-reputations.add": "Add Rule",
22
+ "settings.reaction-reputations.reaction": "Reaction",
23
+ "settings.reaction-reputations.reputation": "Reputation",
24
+ "settings.reaction-reputations.remove": "Delete",
25
+ "settings.reaction-reputations.edit": "Edit",
26
+ "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> has reacted with %2 to your post in <strong>%3</strong>",
27
+ "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> has reacted with %2 to your message in <strong class=\"text-nowrap\"><i class=\"fa %3\"></i> %4</strong>"
25
28
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "notificationType-reaction": "When someone reacts to your posts & chats"
3
+ }
@@ -1,6 +1,28 @@
1
1
  {
2
- "reactions": "Reactions",
3
- "add-reaction": "Add reaction",
4
- "error.invalid-reaction": "Invalid reaction",
5
- "error.maximum-reached": "Maximum reactions reached"
2
+ "reactions": "Reactions",
3
+ "add-reaction": "Add reaction",
4
+ "error.invalid-reaction": "Invalid reaction",
5
+ "error.maximum-reached": "Maximum reactions reached: %1",
6
+ "error.maximum-per-user-per-post-reached": "Maximum reactions per user per post reached: %1",
7
+ "error.maximum-per-user-per-message-reached": "Maximum reactions per user per message reached: %1",
8
+ "error.post-reactions-disabled": "Post reactions are disabled",
9
+ "error.message-reactions-disabled": "Message reactions are disabled",
10
+ "settings.title": "Reactions plugin settings",
11
+ "settings.enable-post-reactions": "Enable post reactions",
12
+ "settings.max-reactions-per-post": "Maximum unique reactions per post (0 for unlimited, default: 4)",
13
+ "settings.max-reactions-per-user-per-post": "Maximum reactions per user per post (0 for unlimited)",
14
+ "settings.max-reactions-per-user-per-post-help": "The limit is enforced only when adding a new reaction and not when joining an existing reaction.",
15
+ "settings.enable-message-reactions": "Enable message reactions",
16
+ "settings.max-reactions-per-message": "Maximum unique reactions per message (0 for unlimited, default: 4)",
17
+ "settings.max-reactions-per-user-per-message": "Maximum reactions per user per message (0 for unlimited)",
18
+ "settings.max-reactions-per-user-per-message-help": "The limit is enforced only when adding a new reaction and not when joining an existing reaction.",
19
+ "settings.reaction-reputations": "Reaction Reputations (Optional)",
20
+ "settings.reaction-reputations-help": "You can assign a reputation to individual reactions. When a reaction is applied to a post, the owner of that post will get this reputation.",
21
+ "settings.reaction-reputations.add": "Add Rule",
22
+ "settings.reaction-reputations.reaction": "Reaction",
23
+ "settings.reaction-reputations.reputation": "Reputation",
24
+ "settings.reaction-reputations.remove": "Delete",
25
+ "settings.reaction-reputations.edit": "Edit",
26
+ "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> has reacted with %2 to your post in <strong>%3</strong>",
27
+ "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> has reacted with %2 to your message in <strong class=\"text-nowrap\"><i class=\"fa %3\"></i> %4</strong>"
6
28
  }
@@ -2,8 +2,11 @@
2
2
  "reactions": "Réactions",
3
3
  "add-reaction": "Ajouter une réaction",
4
4
  "error.invalid-reaction": "Réaction invalide",
5
- "error.maximum-reached": "Réactions maximales atteintes",
6
- "error.maximum-per-user-per-post-reached": "Nombre maximum de réactions par utilisateur et par publication atteint",
5
+ "error.maximum-reached": "Réactions maximales atteintes: %1",
6
+ "error.maximum-per-user-per-post-reached": "Nombre maximum de réactions par utilisateur et par publication atteint: %1",
7
+ "error.maximum-per-user-per-message-reached": "Nombre maximum de réactions par utilisateur et par message atteint: %1",
8
+ "error.post-reactions-disabled": "Les réactions aux publications sont désactivées",
9
+ "error.message-reactions-disabled": "Les réactions aux messages sont désactivées",
7
10
  "settings.title": "Paramètres du plugin Réactions",
8
11
  "settings.enable-post-reactions": "Activer les réactions aux publications",
9
12
  "settings.max-reactions-per-post": "Nombre maximum de réactions uniques par publication (0 pour illimité, par défaut : 4)",
@@ -1,20 +1,23 @@
1
1
  {
2
- "reactions": "Reactions",
3
- "add-reaction": "הוסף תגובה",
4
- "error.invalid-reaction": "תגובה לא חוקית",
5
- "error.maximum-reached": "הגעת למספר התגובות המקסימלי לפוסט",
6
- "error.maximum-per-user-per-post-reached": "הגעת למספר התגובות המקסימלי למשתמש לפוסט",
7
- "settings.title": "הגדרות תגובות",
8
- "settings.max-reactions-per-post": "מספר התגובות המקסימלי לפוסט (0 = ללא הגבלה, ברירת מחדל: 4)",
9
- "settings.max-reactions-per-user-per-post": "מספר התגובות המקסימלי למשתמש לפוסט (0 = ללא הגבלה)",
10
- "settings.max-reactions-per-user-per-post-help": ".ההגבלה נאכפת רק בהוספת תגובה חדשה ולא בהצטרפות לתגובה קיימת",
11
- "settings.reaction-reputations": "מוניטין תגובה (אופציונלי)",
12
- "settings.reaction-reputations-help": "אתה יכול להקצות מוניטין לתגובות מסוימות. כאשר התגובה נוספת לפוסט, בעל הפוסט יקבל את המוניטין שנקבע.",
13
- "settings.reaction-reputations.add": "הוסף כלל",
14
- "settings.reaction-reputations.reaction": "תגובה",
15
- "settings.reaction-reputations.reputation": "מוניטין",
16
- "settings.reaction-reputations.remove": "הסרה",
17
- "settings.reaction-reputations.edit": "עריכה",
18
- "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> הגיב עם %2 לפוסט שלך ב<strong>%3</strong>",
19
- "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> הגיב עם %2 להודעה שלך ב<strong class=\"text-nowrap \"><i class=\"fa %3\"></i>%4</strong>"
2
+ "reactions": "Reactions",
3
+ "add-reaction": "הוסף תגובה",
4
+ "error.invalid-reaction": "תגובה לא חוקית",
5
+ "error.maximum-reached": "הגעת למספר התגובות המקסימלי לפוסט %1",
6
+ "error.maximum-per-user-per-post-reached": "הגעת למספר התגובות המקסימלי למשתמש לפוסט %1",
7
+ "error.maximum-per-user-per-message-reached": "הגעת למספר התגובות המקסימלי למשתמש להודעה %1",
8
+ "error.post-reactions-disabled": "תגובות לפוסט מושבתו",
9
+ "error.message-reactions-disabled": "תגובות להודעה מושבתו",
10
+ "settings.title": "הגדרות תגובות",
11
+ "settings.max-reactions-per-post": "מספר התגובות המקסימלי לפוסט (0 = ללא הגבלה, ברירת מחדל: 4)",
12
+ "settings.max-reactions-per-user-per-post": "מספר התגובות המקסימלי למשתמש לפוסט (0 = ללא הגבלה)",
13
+ "settings.max-reactions-per-user-per-post-help": ".ההגבלה נאכפת רק בהוספת תגובה חדשה ולא בהצטרפות לתגובה קיימת",
14
+ "settings.reaction-reputations": "מוניטין תגובה (אופציונלי)",
15
+ "settings.reaction-reputations-help": "אתה יכול להקצות מוניטין לתגובות מסוימות. כאשר התגובה נוספת לפוסט, בעל הפוסט יקבל את המוניטין שנקבע.",
16
+ "settings.reaction-reputations.add": "הוסף כלל",
17
+ "settings.reaction-reputations.reaction": "תגובה",
18
+ "settings.reaction-reputations.reputation": "מוניטין",
19
+ "settings.reaction-reputations.remove": "הסרה",
20
+ "settings.reaction-reputations.edit": "עריכה",
21
+ "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> הגיב עם %2 לפוסט שלך ב<strong>%3</strong>",
22
+ "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> הגיב עם %2 להודעה שלך ב<strong class=\"text-nowrap \"><i class=\"fa %3\"></i>%4</strong>"
20
23
  }
@@ -1,25 +1,28 @@
1
1
  {
2
- "reactions": "Reakcje",
3
- "add-reaction": "Zareaguj",
4
- "error.invalid-reaction": "Wadliwa reakcja",
5
- "error.maximum-reached": "Osiągnięto limit reakcji",
6
- "error.maximum-per-user-per-post-reached": "Osiągnięto limit reakcji przypadających na jeden wpis",
7
- "settings.title": "Ustawienia wtyczki",
8
- "settings.enable-post-reactions": "Włącz reakcje na wpisy",
9
- "settings.max-reactions-per-post": "Do ilu reakcji na wpis (0 to brak limitu, domyślnie: 4)",
10
- "settings.max-reactions-per-user-per-post": "Do ilu reakcji na wpis ma przypaść na jednego użytkownika (0 to brak limitu)",
11
- "settings.max-reactions-per-user-per-post-help": "Limit odnosi się tylko do nowych reakcji a nie do dołączania się do już dodanych.",
12
- "settings.enable-message-reactions": "Włącz reakcje na wiadomości",
13
- "settings.max-reactions-per-message": "Do ilu reakcji na wiadomość (0 to brak limitu, domyślnie: 4)",
14
- "settings.max-reactions-per-user-per-message": "Do ilu reakcji ograniczyć użytkownika reagującego na wiadomość (0 to brak limitu)",
15
- "settings.max-reactions-per-user-per-message-help": "Limit odnosi się tylko do nowych reakcji a nie do dołączania się do już dodanych.",
16
- "settings.reaction-reputations": "Reakcja a reputacja reakcji (opcjonalnie)",
17
- "settings.reaction-reputations-help": "Reputacja powiązana z reakcjami. Wtedy autor wpisu zbiera reputację o ile pojawią się na niego reakcje.",
18
- "settings.reaction-reputations.add": "Dodaj zasadę",
19
- "settings.reaction-reputations.reaction": "Reakcja",
20
- "settings.reaction-reputations.reputation": "Reputacja",
21
- "settings.reaction-reputations.remove": "Skasuj",
22
- "settings.reaction-reputations.edit": "Zmień",
23
- "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> zareagował %2 na wpis w <strong>%3</strong>",
24
- "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> zareagował %2 na wiadomość w <strong class=\"text-nowrap\"><i class=\"fa %3\"></i>%4</strong>"
2
+ "reactions": "Reakcje",
3
+ "add-reaction": "Zareaguj",
4
+ "error.invalid-reaction": "Wadliwa reakcja",
5
+ "error.maximum-reached": "Osiągnięto limit reakcji: %1",
6
+ "error.maximum-per-user-per-post-reached": "Osiągnięto limit reakcji przypadających na jeden wpis: %1",
7
+ "error.maximum-per-user-per-message-reached": "Osiągnięto limit reakcji przypadających na jedną wiadomość: %1",
8
+ "error.post-reactions-disabled": "Reakcje na wpisy są wyłączone",
9
+ "error.message-reactions-disabled": "Reakcje na wiadomości wyłączone",
10
+ "settings.title": "Ustawienia wtyczki",
11
+ "settings.enable-post-reactions": "Włącz reakcje na wpisy",
12
+ "settings.max-reactions-per-post": "Do ilu reakcji na wpis (0 to brak limitu, domyślnie: 4)",
13
+ "settings.max-reactions-per-user-per-post": "Do ilu reakcji na wpis ma przypaść na jednego użytkownika (0 to brak limitu)",
14
+ "settings.max-reactions-per-user-per-post-help": "Limit odnosi się tylko do nowych reakcji a nie do dołączania się do już dodanych.",
15
+ "settings.enable-message-reactions": "Włącz reakcje na wiadomości",
16
+ "settings.max-reactions-per-message": "Do ilu reakcji na wiadomość (0 to brak limitu, domyślnie: 4)",
17
+ "settings.max-reactions-per-user-per-message": "Do ilu reakcji ograniczyć użytkownika reagującego na wiadomość (0 to brak limitu)",
18
+ "settings.max-reactions-per-user-per-message-help": "Limit odnosi się tylko do nowych reakcji a nie do dołączania się do już dodanych.",
19
+ "settings.reaction-reputations": "Reakcja a reputacja reakcji (opcjonalnie)",
20
+ "settings.reaction-reputations-help": "Reputacja powiązana z reakcjami. Wtedy autor wpisu zbiera reputację o ile pojawią się na niego reakcje.",
21
+ "settings.reaction-reputations.add": "Dodaj zasadę",
22
+ "settings.reaction-reputations.reaction": "Reakcja",
23
+ "settings.reaction-reputations.reputation": "Reputacja",
24
+ "settings.reaction-reputations.remove": "Skasuj",
25
+ "settings.reaction-reputations.edit": "Zmień",
26
+ "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> zareagował %2 na wpis w <strong>%3</strong>",
27
+ "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> zareagował %2 na wiadomość w <strong class=\"text-nowrap\"><i class=\"fa %3\"></i>%4</strong>"
25
28
  }
@@ -1,6 +1,8 @@
1
1
  {
2
- "reactions": "Реакции",
3
- "add-reaction": "Добавить реакцию",
4
- "error.invalid-reaction": "Некорректная реакция",
5
- "error.maximum-reached": "Максимальное количество реакций достигнуто"
2
+ "reactions": "Реакции",
3
+ "add-reaction": "Добавить реакцию",
4
+ "error.invalid-reaction": "Некорректная реакция",
5
+ "error.maximum-reached": "Максимальное количество реакций достигнуто: %1",
6
+ "error.maximum-per-user-per-post-reached": "Максимальное количество реакций на пользователя для этого поста достигнуто: %1",
7
+ "error.maximum-per-user-per-message-reached": "Максимальное количество реакций на пользователя для этого сообщения достигнуто: %1"
6
8
  }
@@ -1,23 +1,26 @@
1
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"
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ı: %1",
6
+ "error.maximum-per-user-per-post-reached": "Bir kullanıcıya iletisi için verilebilecek en fazla sayıda tepkiye ulaşıldı: %1",
7
+ "error.maximum-per-user-per-message-reached": "Bir kullanıcıya mesajı için verilebilecek en fazla sayıda tepkiye ulaşıldı: %1",
8
+ "error.post-reactions-disabled": "İleti tepkileri devre dışı",
9
+ "error.message-reactions-disabled": "Mesaj tepkileri devre dışı",
10
+ "settings.title": "Tepkiler eklentisi ayarları",
11
+ "settings.enable-post-reactions": "İleti tepkilerini aktifleştir",
12
+ "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)",
13
+ "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)",
14
+ "settings.max-reactions-per-user-per-post-help": "Sayı limiti sadece iletiye farklı ve yeni bir tepki eklenirken uygulanır.",
15
+ "settings.enable-message-reactions": "Sohbet tepkilerini etkinleştir",
16
+ "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)",
17
+ "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)",
18
+ "settings.max-reactions-per-user-per-message-help": "Sayı limiti sadece mesaja farklı ve yeni bir tepki eklenirken uygulanır.",
19
+ "settings.reaction-reputations": "Tepki Saygınlıkları (İsteğe bağlı)",
20
+ "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.",
21
+ "settings.reaction-reputations.add": "Kural ekle",
22
+ "settings.reaction-reputations.reaction": "Tepki",
23
+ "settings.reaction-reputations.reputation": "Saygınlık",
24
+ "settings.reaction-reputations.remove": "Sil",
25
+ "settings.reaction-reputations.edit": "Düzenle"
23
26
  }
@@ -1,25 +1,28 @@
1
1
  {
2
- "reactions": "回应",
3
- "add-reaction": "添加回应",
4
- "error.invalid-reaction": "无效的回应",
5
- "error.maximum-reached": "达到最大回应数",
6
- "error.maximum-per-user-per-post-reached": "每个用户每篇帖子的最大回应数",
7
- "settings.title": "回应插件设置",
8
- "settings.enable-post-reactions": "启用帖子回应",
9
- "settings.max-reactions-per-post": "每个帖子的最大唯一回应数(0 表示无限制,默认值:4)",
10
- "settings.max-reactions-per-user-per-post": "每个用户每个帖子的最大回应数(0 表示无限制)",
11
- "settings.max-reactions-per-user-per-post-help": "该限制仅在添加新回应时有效,在添加现有回应时无效。",
12
- "settings.enable-message-reactions": "启用信息回应",
13
- "settings.max-reactions-per-message": "每条信息的最大唯一回应数(0 表示无限制,默认值:4)",
14
- "settings.max-reactions-per-user-per-message": "每个用户每条信息的最大回应次数(0 表示无限制)",
15
- "settings.max-reactions-per-user-per-message-help": "该限制仅在添加新回应时有效,在添加现有回应时无效。",
16
- "settings.reaction-reputations": "回应声望(可选)",
17
- "settings.reaction-reputations-help": "您可以为单个回应分配声望。当一个回应应用到一个帖子时,该帖子的所有者就会得到这个声望。",
18
- "settings.reaction-reputations.add": "添加规则",
19
- "settings.reaction-reputations.reaction": "回应",
20
- "settings.reaction-reputations.reputation": "声望",
21
- "settings.reaction-reputations.remove": "删除",
22
- "settings.reaction-reputations.edit": "编辑",
23
- "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> 已用 %2 对您在 <strong>%3</strong> 中发表的帖子做出了回应",
24
- "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> 已用 %2 对您在 <strong class=\"text-nowrap\"><i class=\"fa %3\"></i>%4</strong> 中的信息做出了回应"
2
+ "reactions": "回应",
3
+ "add-reaction": "添加回应",
4
+ "error.invalid-reaction": "无效的回应",
5
+ "error.maximum-reached": "达到最大回应数: %1",
6
+ "error.maximum-per-user-per-post-reached": "每个用户每篇帖子的最大回应数: %1",
7
+ "error.maximum-per-user-per-message-reached": "每个用户每条信息的最大回应数: %1",
8
+ "error.post-reactions-disabled": "帖子回应已禁用",
9
+ "error.message-reactions-disabled": "信息回应已禁用",
10
+ "settings.title": "回应插件设置",
11
+ "settings.enable-post-reactions": "启用帖子回应",
12
+ "settings.max-reactions-per-post": "每个帖子的最大唯一回应数(0 表示无限制,默认值:4)",
13
+ "settings.max-reactions-per-user-per-post": "每个用户每个帖子的最大回应数(0 表示无限制)",
14
+ "settings.max-reactions-per-user-per-post-help": "该限制仅在添加新回应时有效,在添加现有回应时无效。",
15
+ "settings.enable-message-reactions": "启用信息回应",
16
+ "settings.max-reactions-per-message": "每条信息的最大唯一回应数(0 表示无限制,默认值:4)",
17
+ "settings.max-reactions-per-user-per-message": "每个用户每条信息的最大回应次数(0 表示无限制)",
18
+ "settings.max-reactions-per-user-per-message-help": "该限制仅在添加新回应时有效,在添加现有回应时无效。",
19
+ "settings.reaction-reputations": "回应声望(可选)",
20
+ "settings.reaction-reputations-help": "您可以为单个回应分配声望。当一个回应应用到一个帖子时,该帖子的所有者就会得到这个声望。",
21
+ "settings.reaction-reputations.add": "添加规则",
22
+ "settings.reaction-reputations.reaction": "回应",
23
+ "settings.reaction-reputations.reputation": "声望",
24
+ "settings.reaction-reputations.remove": "删除",
25
+ "settings.reaction-reputations.edit": "编辑",
26
+ "notification.user-has-reacted-with-to-your-post-in-topic": "<strong>%1</strong> 已用 %2 对您在 <strong>%3</strong> 中发表的帖子做出了回应",
27
+ "notification.user-has-reacted-with-to-your-message-in-room": "<strong>%1</strong> 已用 %2 对您在 <strong class=\"text-nowrap\"><i class=\"fa %3\"></i>%4</strong> 中的信息做出了回应"
25
28
  }
package/library.js CHANGED
@@ -55,19 +55,36 @@ ReactionsPlugin.addAdminNavigation = async function (header) {
55
55
  };
56
56
 
57
57
  ReactionsPlugin.getPluginConfig = async function (config) {
58
- try {
59
- const settings = await meta.settings.get('reactions');
60
- config.maximumReactions = settings.maximumReactions ? parseInt(settings.maximumReactions, 10) : DEFAULT_MAX_EMOTES;
61
- config.maximumReactionsPerMessage = settings.maximumReactionsPerMessage ?
62
- parseInt(settings.maximumReactionsPerMessage, 10) : DEFAULT_MAX_EMOTES;
63
- config.enablePostReactions = settings.enablePostReactions === 'on';
64
- config.enableMessageReactions = settings.enableMessageReactions === 'on';
65
- } catch (e) {
66
- console.error(e);
67
- }
58
+ const settings = await loadPluginConfig();
59
+ config.maximumReactions = settings.maximumReactions;
60
+ config.maximumReactionsPerUserPerPost = settings.maximumReactionsPerUserPerPost;
61
+ config.maximumReactionsPerMessage = settings.maximumReactionsPerMessage;
62
+ config.maximumReactionsPerUserPerMessage = settings.maximumReactionsPerUserPerMessage;
63
+
64
+ config.enablePostReactions = settings.enablePostReactions;
65
+ config.enableMessageReactions = settings.enableMessageReactions;
68
66
  return config;
69
67
  };
70
68
 
69
+ async function loadPluginConfig() {
70
+ const settings = await meta.settings.get('reactions');
71
+ function parseNum(val, defaultValue) {
72
+ const parsed = parseInt(val, 10);
73
+ return Number.isNaN(parsed) ? defaultValue : parsed;
74
+ }
75
+ // posts
76
+ settings.maximumReactions = parseNum(settings.maximumReactions, DEFAULT_MAX_EMOTES);
77
+ settings.maximumReactionsPerUserPerPost = parseNum(settings.maximumReactionsPerUserPerPost, 0);
78
+
79
+ // chats
80
+ settings.maximumReactionsPerMessage = parseNum(settings.maximumReactionsPerMessage, DEFAULT_MAX_EMOTES);
81
+ settings.maximumReactionsPerUserPerMessage = parseNum(settings.maximumReactionsPerUserPerMessage, 0);
82
+
83
+ settings.enablePostReactions = settings.enablePostReactions === 'on';
84
+ settings.enableMessageReactions = settings.enableMessageReactions === 'on';
85
+ return settings;
86
+ }
87
+
71
88
  ReactionsPlugin.filterSettingsGet = async function (hookData) {
72
89
  if (hookData.plugin === 'reactions') {
73
90
  const { values } = hookData;
@@ -97,11 +114,11 @@ ReactionsPlugin.getPostReactions = async function (data) {
97
114
  }
98
115
 
99
116
  try {
100
- const settings = await meta.settings.get('reactions');
101
- if (settings.enablePostReactions === 'off') {
117
+ const settings = await loadPluginConfig();
118
+ if (!settings.enablePostReactions) {
102
119
  return data;
103
120
  }
104
- const maximumReactions = settings.maximumReactions || DEFAULT_MAX_EMOTES;
121
+ const { maximumReactions } = settings;
105
122
 
106
123
  const pids = data.posts.map(post => post && parseInt(post.pid, 10));
107
124
  const allReactionsForPids = await db.getSetsMembers(pids.map(pid => `pid:${pid}:reactions`));
@@ -118,7 +135,7 @@ ReactionsPlugin.getPostReactions = async function (data) {
118
135
 
119
136
  if (reactionsList && reactionsList.length > 0) {
120
137
  pidToReactionsMap.set(pid, reactionsList);
121
- pidToIsMaxReactionsReachedMap.set(pid, reactionsCount > maximumReactions);
138
+ pidToIsMaxReactionsReachedMap.set(pid, maximumReactions > 0 && reactionsCount >= maximumReactions);
122
139
  reactionSets = reactionSets.concat(reactionsList.map(reaction => `pid:${pid}:reaction:${reaction}`));
123
140
  }
124
141
  } catch (e) {
@@ -164,14 +181,14 @@ ReactionsPlugin.getMessageReactions = async function (data) {
164
181
  }
165
182
 
166
183
  try {
167
- const settings = await meta.settings.get('reactions');
168
- if (settings.enableMessageReactions === 'off') {
184
+ const settings = await loadPluginConfig();
185
+ if (!settings.enableMessageReactions) {
169
186
  return data;
170
187
  }
171
- const maximumReactionsPerMessage = settings.maximumReactionsPerMessage || DEFAULT_MAX_EMOTES;
188
+ const { maximumReactionsPerMessage } = settings;
172
189
 
173
190
  const mids = data.messages.map(message => message && parseInt(message.mid, 10));
174
- const allReactionsForMids = await db.getSetsMembers(mids.map(pid => `mid:${pid}:reactions`));
191
+ const allReactionsForMids = await db.getSetsMembers(mids.map(mid => `mid:${mid}:reactions`));
175
192
 
176
193
  const midToIsMaxReactionsReachedMap = new Map(); // mid -> IsMaxReactionsReached (boolean)
177
194
  const midToReactionsMap = new Map(); // mid -> reactions (string[])
@@ -184,7 +201,10 @@ ReactionsPlugin.getMessageReactions = async function (data) {
184
201
 
185
202
  if (reactionsList && reactionsList.length > 0) {
186
203
  midToReactionsMap.set(mid, reactionsList);
187
- midToIsMaxReactionsReachedMap.set(mid, reactionsCount > maximumReactionsPerMessage);
204
+ midToIsMaxReactionsReachedMap.set(
205
+ mid,
206
+ maximumReactionsPerMessage > 0 && reactionsCount >= maximumReactionsPerMessage
207
+ );
188
208
  reactionSets = reactionSets.concat(reactionsList.map(reaction => `mid:${mid}:reaction:${reaction}`));
189
209
  }
190
210
  }
@@ -330,11 +350,11 @@ SocketPlugins.reactions = {
330
350
  throw new Error('[[reactions:error.invalid-reaction]]');
331
351
  }
332
352
 
333
- const settings = await meta.settings.get('reactions');
334
- if (settings.enablePostReactions === 'off') {
353
+ const settings = await loadPluginConfig();
354
+ if (!settings.enablePostReactions) {
335
355
  throw new Error('[[error:post-reactions-disabled]]');
336
356
  }
337
- const maximumReactions = settings.maximumReactions || DEFAULT_MAX_EMOTES;
357
+
338
358
  const [postData, totalReactions, emojiIsAlreadyExist, alreadyReacted, reactionReputation] = await Promise.all([
339
359
  posts.getPostFields(data.pid, ['pid', 'tid', 'uid', 'content', 'sourceContent']),
340
360
  db.setCount(`pid:${data.pid}:reactions`),
@@ -349,18 +369,17 @@ SocketPlugins.reactions = {
349
369
  data.uid = socket.uid;
350
370
  data.tid = tid;
351
371
  if (!emojiIsAlreadyExist) {
352
- if (totalReactions > maximumReactions) {
353
- throw new Error(`[[reactions:error.maximum-reached]] (${maximumReactions})`);
372
+ const { maximumReactions, maximumReactionsPerUserPerPost } = settings;
373
+ if (maximumReactions > 0 && totalReactions >= maximumReactions) {
374
+ throw new Error(`[[reactions:error.maximum-reached, ${maximumReactions}]]`);
354
375
  }
355
376
 
356
- const maximumReactionsPerUserPerPost = settings.maximumReactionsPerUserPerPost ?
357
- parseInt(settings.maximumReactionsPerUserPerPost, 10) : 0;
358
377
  if (maximumReactionsPerUserPerPost > 0) {
359
378
  const emojiesInPost = await db.getSetMembers(`pid:${data.pid}:reactions`);
360
379
  const userPostReactions = await db.isMemberOfSets(emojiesInPost.map(emojiName => `pid:${data.pid}:reaction:${emojiName}`), socket.uid);
361
380
  const userPostReactionCount = userPostReactions.filter(Boolean).length;
362
- if (userPostReactionCount > maximumReactionsPerUserPerPost) {
363
- throw new Error(`[[reactions:error.maximum-per-user-per-post-reached]] (${maximumReactionsPerUserPerPost})`);
381
+ if (userPostReactionCount >= maximumReactionsPerUserPerPost) {
382
+ throw new Error(`[[reactions:error.maximum-per-user-per-post-reached, ${maximumReactionsPerUserPerPost}]]`);
364
383
  }
365
384
  }
366
385
  }
@@ -411,12 +430,12 @@ SocketPlugins.reactions = {
411
430
  }
412
431
 
413
432
  const [settings, tid, hasReacted, reactionReputation] = await Promise.all([
414
- meta.settings.get('reactions'),
433
+ loadPluginConfig(),
415
434
  posts.getPostField(data.pid, 'tid'),
416
435
  db.isSetMember(`pid:${data.pid}:reaction:${data.reaction}`, socket.uid),
417
436
  getReactionReputation(data.reaction),
418
437
  ]);
419
- if (settings.enablePostReactions === 'off') {
438
+ if (!settings.enablePostReactions) {
420
439
  throw new Error('[[error:post-reactions-disabled]]');
421
440
  }
422
441
  if (!tid) {
@@ -448,11 +467,11 @@ SocketPlugins.reactions = {
448
467
  throw new Error('[[reactions:error.invalid-reaction]]');
449
468
  }
450
469
 
451
- const settings = await meta.settings.get('reactions');
452
- if (settings.enableMessageReactions === 'off') {
453
- throw new Error('[[error:post-reactions-disabled]]');
470
+ const settings = await loadPluginConfig();
471
+ if (!settings.enableMessageReactions) {
472
+ throw new Error('[[error:message-reactions-disabled]]');
454
473
  }
455
- const maximumReactionsPerMessage = settings.maximumReactionsPerMessage || DEFAULT_MAX_EMOTES;
474
+
456
475
  const [msgData, totalReactions, emojiIsAlreadyExist] = await Promise.all([
457
476
  messaging.getMessageFields(data.mid, ['roomId', 'fromuid', 'content']),
458
477
  db.setCount(`mid:${data.mid}:reactions`),
@@ -467,18 +486,17 @@ SocketPlugins.reactions = {
467
486
  data.roomId = roomId;
468
487
 
469
488
  if (!emojiIsAlreadyExist) {
470
- if (totalReactions > maximumReactionsPerMessage) {
471
- throw new Error(`[[reactions:error.maximum-reached]] (${maximumReactionsPerMessage})`);
489
+ const { maximumReactionsPerMessage, maximumReactionsPerUserPerMessage } = settings;
490
+ if (maximumReactionsPerMessage > 0 && totalReactions >= maximumReactionsPerMessage) {
491
+ throw new Error(`[[reactions:error.maximum-reached, ${maximumReactionsPerMessage}]]`);
472
492
  }
473
493
 
474
- const maximumReactionsPerUserPerMessage = settings.maximumReactionsPerUserPerMessage ?
475
- parseInt(settings.maximumReactionsPerUserPerMessage, 10) : 0;
476
494
  if (maximumReactionsPerUserPerMessage > 0) {
477
495
  const emojiesInMessage = await db.getSetMembers(`mid:${data.mid}:reactions`);
478
496
  const userPostReactions = await db.isMemberOfSets(emojiesInMessage.map(emojiName => `mid:${data.mid}:reaction:${emojiName}`), socket.uid);
479
497
  const userPostReactionCount = userPostReactions.filter(Boolean).length;
480
- if (userPostReactionCount > maximumReactionsPerUserPerMessage) {
481
- throw new Error(`[[reactions:error.maximum-per-user-per-post-reached]] (${maximumReactionsPerUserPerMessage})`);
498
+ if (userPostReactionCount >= maximumReactionsPerUserPerMessage) {
499
+ throw new Error(`[[reactions:error.maximum-per-user-per-message-reached, ${maximumReactionsPerUserPerMessage}]]`);
482
500
  }
483
501
  }
484
502
  }
@@ -530,12 +548,12 @@ SocketPlugins.reactions = {
530
548
  }
531
549
 
532
550
  const [settings, roomId, hasReacted] = await Promise.all([
533
- meta.settings.get('reactions'),
551
+ loadPluginConfig(),
534
552
  messaging.getMessageField(data.mid, 'roomId'),
535
553
  db.isSetMember(`mid:${data.mid}:reaction:${data.reaction}`, socket.uid),
536
554
  ]);
537
- if (settings.enableMessageReactions === 'off') {
538
- throw new Error('[[error:post-reactions-disabled]]');
555
+ if (!settings.enableMessageReactions) {
556
+ throw new Error('[[error:message-reactions-disabled]]');
539
557
  }
540
558
  if (!roomId) {
541
559
  throw new Error('[[error:no-message]]');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodebb/nodebb-plugin-reactions",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "nbbpm": {
5
5
  "compatibility": "^4.14.0"
6
6
  },
package/public/client.js CHANGED
@@ -147,7 +147,8 @@ $(document).ready(function () {
147
147
  }
148
148
 
149
149
  function updatePostReactionCount(data, type) {
150
- const maxReactionsReached = parseInt(data.totalReactions, 10) > config.maximumReactions;
150
+ const maxReactionsReached = config.maximumReactions > 0 &&
151
+ parseInt(data.totalReactions, 10) >= config.maximumReactions;
151
152
  $('[component="post/reaction/add"][data-pid="' + data.pid + '"]').toggleClass('max-reactions', maxReactionsReached);
152
153
 
153
154
  const reactionEl = $(`[component="post/reaction"][data-pid="${data.pid}"][data-reaction="${data.reaction}"]`);
@@ -179,7 +180,8 @@ $(document).ready(function () {
179
180
  }
180
181
 
181
182
  function updateMessageReactionCount(data, type) {
182
- const maxReactionsReached = parseInt(data.totalReactions, 10) > config.maximumReactionsPerMessage;
183
+ const maxReactionsReached = config.maximumReactionsPerMessage > 0 &&
184
+ parseInt(data.totalReactions, 10) >= config.maximumReactionsPerMessage;
183
185
  $('[component="message/reaction/add"][data-mid="' + data.mid + '"]').toggleClass('max-reactions', maxReactionsReached);
184
186
 
185
187
  const reactionEl = $(`[component="message/reaction"][data-mid="${data.mid}"][data-reaction="${data.reaction}"]`);