Skip to content

Node.js based forum software built for the modern web

test: fix tests, update mentions composer

Barış Soner Uşaklıd6c694652cdf
diff --git a/install/package.json b/install/package.json
index 4222a20daa..930be88458 100644
--- a/install/package.json
+++ b/install/package.json
@@ -97,13 +97,13 @@
"multer": "2.0.2",
"nconf": "0.13.0",
"nodebb-plugin-2factor": "7.6.1",
- "nodebb-plugin-composer-default": "10.3.6",
+ "nodebb-plugin-composer-default": "10.3.7",
"nodebb-plugin-dbsearch": "6.3.5",
"nodebb-plugin-emoji": "6.0.5",
"nodebb-plugin-emoji-android": "4.1.1",
"nodebb-plugin-link-preview": "2.2.2",
"nodebb-plugin-markdown": "13.2.3",
- "nodebb-plugin-mentions": "4.8.7",
+ "nodebb-plugin-mentions": "4.8.9",
"nodebb-plugin-spam-be-gone": "2.3.2",
"nodebb-plugin-web-push": "0.7.6",
"nodebb-rewards-essentials": "1.0.2",
diff --git a/public/language/en-GB/notifications.json b/public/language/en-GB/notifications.json
index 1a14907ee0..2436ece347 100644
--- a/public/language/en-GB/notifications.json
+++ b/public/language/en-GB/notifications.json
@@ -36,33 +36,33 @@
"user-posted-in-public-room-dual": "<strong>%1</strong> and <strong>%2</strong> wrote in <strong class=\"text-nowrap\"><i class=\"fa %3\"></i>%4</strong>",
"user-posted-in-public-room-triple": "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> wrote in <strong class=\"text-nowrap\"><i class=\"fa %4\"></i>%5</strong>",
"user-posted-in-public-room-multiple": "<strong>%1</strong>, <strong>%2</strong> and %3 others wrote in <strong class=\"text-nowrap\"><i class=\"fa %4\"></i>%5</strong>",
- "upvoted-your-post-in": "<strong>%1</strong> upvoted<br/><strong>%2</strong>",
- "upvoted-your-post-in-dual": "<strong>%1</strong> and <strong>%2</strong> upvoted<br/><strong>%3</strong>",
- "upvoted-your-post-in-triple": "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> upvoted<br/><strong>%4</strong>",
- "upvoted-your-post-in-multiple": "<strong>%1</strong>, <strong>%2</strong> and %3 others upvoted<br/><strong>%4</strong>.",
+ "upvoted-your-post-in": "<strong>%1</strong> upvoted your post in <br/><strong>%2</strong>",
+ "upvoted-your-post-in-dual": "<strong>%1</strong> and <strong>%2</strong> upvoted your post in <br/><strong>%3</strong>",
+ "upvoted-your-post-in-triple": "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> upvoted your post in <br/><strong>%4</strong>",
+ "upvoted-your-post-in-multiple": "<strong>%1</strong>, <strong>%2</strong> and %3 others upvoted your post in <br/><strong>%4</strong>.",
"moved-your-post": "<strong>%1</strong> has moved your post to <strong>%2</strong>",
"moved-your-topic": "<strong>%1</strong> has moved <strong>%2</strong>",
- "user-flagged-post-in": "<strong>%1</strong> flagged a post<br/><strong>%2</strong>",
- "user-flagged-post-in-dual": "<strong>%1</strong> and <strong>%2</strong> flagged a post<br/><strong>%3</strong>",
- "user-flagged-post-in-triple": "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> flagged a post<br/><strong>%4</strong>",
- "user-flagged-post-in-multiple": "<strong>%1</strong>, <strong>%2</strong> and %3 others flagged a post<br/><strong>%4</strong>",
+ "user-flagged-post-in": "<strong>%1</strong> flagged a post in <br/><strong>%2</strong>",
+ "user-flagged-post-in-dual": "<strong>%1</strong> and <strong>%2</strong> flagged a post in <br/><strong>%3</strong>",
+ "user-flagged-post-in-triple": "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> flagged a post in <br/><strong>%4</strong>",
+ "user-flagged-post-in-multiple": "<strong>%1</strong>, <strong>%2</strong> and %3 others flagged a post in <br/><strong>%4</strong>",
"user-flagged-user": "<strong>%1</strong> flagged a user profile (%2)",
"user-flagged-user-dual": "<strong>%1</strong> and <strong>%2</strong> flagged a user profile (%3)",
"user-flagged-user-triple": "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> flagged a user profile (%4)",
"user-flagged-user-multiple": "<strong>%1</strong>, <strong>%2</strong> and %3 others flagged a user profile (%4)",
- "user-posted-to" : "<strong>%1</strong> replied in<br/><strong>%2</strong>",
- "user-posted-to-dual" : "<strong>%1</strong> and <strong>%2</strong> replied in<br/><strong>%3</strong>",
- "user-posted-to-triple" : "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> replied in<br/><strong>%4</strong>",
- "user-posted-to-multiple" : "<strong>%1</strong>, <strong>%2</strong> and %3 others replied in<br/><strong>%4</strong>",
- "user-posted-topic": "<strong>%1</strong> posted<br/><strong>%2</strong>",
- "user-edited-post" : "<strong>%1</strong> edited a post in<br/><strong>%2</strong>",
+ "user-posted-to" : "<strong>%1</strong> replied in <br/><strong>%2</strong>",
+ "user-posted-to-dual" : "<strong>%1</strong> and <strong>%2</strong> replied in <br/><strong>%3</strong>",
+ "user-posted-to-triple" : "<strong>%1</strong>, <strong>%2</strong> and <strong>%3</strong> replied in <br/><strong>%4</strong>",
+ "user-posted-to-multiple" : "<strong>%1</strong>, <strong>%2</strong> and %3 others replied in <br/><strong>%4</strong>",
+ "user-posted-topic": "<strong>%1</strong> posted <br/><strong>%2</strong>",
+ "user-edited-post" : "<strong>%1</strong> edited a post in <br/><strong>%2</strong>",
- "user-posted-topic-with-tag": "<strong>%1</strong> posted<br/><strong>%2</strong> (tagged %3)",
- "user-posted-topic-with-tag-dual": "<strong>%1</strong> posted<br/><strong>%2</strong> (tagged %3 and %4)",
- "user-posted-topic-with-tag-triple": "<strong>%1</strong> posted<br/><strong>%2</strong> (tagged %3, %4, and %5)",
- "user-posted-topic-with-tag-multiple": "<strong>%1</strong> posted<br/><strong>%2</strong> (tagged %3)",
+ "user-posted-topic-with-tag": "<strong>%1</strong> posted <br/><strong>%2</strong> (tagged %3)",
+ "user-posted-topic-with-tag-dual": "<strong>%1</strong> posted <br/><strong>%2</strong> (tagged %3 and %4)",
+ "user-posted-topic-with-tag-triple": "<strong>%1</strong> posted <br/><strong>%2</strong> (tagged %3, %4, and %5)",
+ "user-posted-topic-with-tag-multiple": "<strong>%1</strong> posted <br/><strong>%2</strong> (tagged %3)",
- "user-posted-topic-in-category": "<strong>%1</strong> posted<br/><strong>%2</strong> (category %3)",
+ "user-posted-topic-in-category": "<strong>%1</strong> posted <br/><strong>%2</strong> (category %3)",
"user-started-following-you": "<strong>%1</strong> started following you.",
"user-started-following-you-dual": "<strong>%1</strong> and <strong>%2</strong> started following you.",
diff --git a/test/controllers.js b/test/controllers.js
index c6cab42b2e..934e4ae7a3 100644
--- a/test/controllers.js
+++ b/test/controllers.js
@@ -1171,7 +1171,7 @@ describe('Controllers', () => {
assert.equal(response.statusCode, 200);
assert(body);
const notif = body.notifications[0];
- assert.equal(notif.bodyShort, '<strong>test1</strong> has posted a reply to: <strong>test2</strong>');
+ assert.equal(notif.bodyShort, '<strong>test1</strong> replied in <br/><strong>test2</strong>');
assert.equal(notif.bodyLong, notifData.bodyLong);
assert.equal(notif.pid, notifData.pid);
assert.equal(notif.path, nconf.get('relative_path') + notifData.path);
diff --git a/test/translator.js b/test/translator.js
index 04d11112d5..99ff09ebe2 100644
--- a/test/translator.js
+++ b/test/translator.js
@@ -126,7 +126,7 @@ describe('new Translator(language)', () => {
const translator = Translator.create('en-GB');
return translator.translate('[[notifications:user-posted-to, [[global:guest]], My Topic]]').then((translated) => {
- assert.strictEqual(translated, '<strong>Guest</strong> has posted a reply to: <strong>My Topic</strong>');
+ assert.strictEqual(translated, '<strong>Guest</strong> replied in <br/><strong>My Topic</strong>');
});
});
@@ -134,7 +134,7 @@ describe('new Translator(language)', () => {
const translator = Translator.create('en-GB');
return translator.translate('[[notifications:user-posted-to, [[global:guest]], [[global:guest]]]]').then((translated) => {
- assert.strictEqual(translated, '<strong>Guest</strong> has posted a reply to: <strong>Guest</strong>');
+ assert.strictEqual(translated, '<strong>Guest</strong> replied in <br/><strong>Guest</strong>');
});
});
@@ -178,7 +178,7 @@ describe('new Translator(language)', () => {
const key = '[[notifications:upvoted-your-post-in, test1, error: Error: &lsqb;&lsqb;error:group-name-too-long&rsqb;&rsqb; on NodeBB Upgrade]]';
return translator.translate(key).then((translated) => {
- assert.strictEqual(translated, '<strong>test1</strong> has upvoted your post in <strong>error: Error: &lsqb;&lsqb;error:group-name-too-long&rsqb;&rsqb; on NodeBB Upgrade</strong>.');
+ assert.strictEqual(translated, '<strong>test1</strong> upvoted your post in <br/><strong>error: Error: &lsqb;&lsqb;error:group-name-too-long&rsqb;&rsqb; on NodeBB Upgrade</strong>');
});
});