mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +01:00
Fixes #3695
Guests now trigger topic notifications, and the translator has been updated so that translations inside translations are handled in a way that doesn't cause the translator to explode.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
var languages = {},
|
||||
regexes = {
|
||||
match: /\[\[\w+:.*?\]\]/g,
|
||||
match: /\[\[\w+:[^\[]*?\]\]/g,
|
||||
split: /[,][\s]*/,
|
||||
replace: /\]+$/
|
||||
};
|
||||
@@ -153,7 +153,12 @@
|
||||
translateKey(key, data, language, function(translated) {
|
||||
--count;
|
||||
if (count <= 0) {
|
||||
callback(translated.text);
|
||||
keys = translated.text.match(regexes.match);
|
||||
if (!keys) {
|
||||
callback(translated.text);
|
||||
} else {
|
||||
translateKeys(keys, translated.text, language, callback);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -252,10 +252,10 @@ module.exports = function(Topics) {
|
||||
}
|
||||
|
||||
if (parseInt(uid, 10)) {
|
||||
Topics.notifyFollowers(postData, uid);
|
||||
user.setUserField(uid, 'lastonline', Date.now());
|
||||
}
|
||||
|
||||
Topics.notifyFollowers(postData, uid);
|
||||
plugins.fireHook('action:topic.reply', postData);
|
||||
|
||||
next(null, postData);
|
||||
|
||||
Reference in New Issue
Block a user