mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 01:56:12 +01:00
fix: #10569, fix category move event text
This commit is contained in:
@@ -7,6 +7,7 @@ const user = require('../user');
|
|||||||
const posts = require('../posts');
|
const posts = require('../posts');
|
||||||
const categories = require('../categories');
|
const categories = require('../categories');
|
||||||
const plugins = require('../plugins');
|
const plugins = require('../plugins');
|
||||||
|
const translator = require('../translator');
|
||||||
|
|
||||||
const Events = module.exports;
|
const Events = module.exports;
|
||||||
|
|
||||||
@@ -144,7 +145,7 @@ async function modifyEvent({ tid, uid, eventIds, timestamps, events }) {
|
|||||||
}
|
}
|
||||||
if (event.hasOwnProperty('fromCid')) {
|
if (event.hasOwnProperty('fromCid')) {
|
||||||
event.fromCategory = fromCategories[event.fromCid];
|
event.fromCategory = fromCategories[event.fromCid];
|
||||||
event.text = `[[topic:moved-from-by, ${event.fromCategory.name}]]`;
|
event.text = translator.compile('topic:moved-from-by', event.fromCategory.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(event, Events._types[event.type]);
|
Object.assign(event, Events._types[event.type]);
|
||||||
|
|||||||
Reference in New Issue
Block a user