mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: add new lang string for minutes
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
"category-not-selected": "Category not selected.",
|
||||
"too-many-posts": "You can only post once every %1 second(s) - please wait before posting again",
|
||||
"too-many-posts-newbie": "As a new user, you can only post once every %1 second(s) until you have earned %2 reputation - please wait before posting again",
|
||||
"too-many-posts-newbie-minutes": "As a new user, you can only post once every %1 minute(s) until you have earned %2 reputation - please wait before posting again",
|
||||
"already-posting": "You are already posting",
|
||||
"tag-too-short": "Please enter a longer tag. Tags should contain at least %1 character(s)",
|
||||
"tag-too-long": "Please enter a shorter tag. Tags can't be longer than %1 character(s)",
|
||||
|
||||
@@ -58,7 +58,11 @@ module.exports = function (User) {
|
||||
meta.config.newbiePostDelayThreshold > userData.reputation &&
|
||||
now - lasttime < meta.config.newbiePostDelay * 1000
|
||||
) {
|
||||
throw new Error(`[[error:too-many-posts-newbie, ${meta.config.newbiePostDelay}, ${meta.config.newbiePostDelayThreshold}]]`);
|
||||
if (meta.config.newbiewPostDelay % 60 === 0) {
|
||||
throw new Error(`[[error:too-many-posts-newbie-minutes, ${Math.floor(meta.config.newbiePostDelay / 60)}, ${meta.config.newbiePostDelayThreshold}]]`);
|
||||
} else {
|
||||
throw new Error(`[[error:too-many-posts-newbie, ${meta.config.newbiePostDelay}, ${meta.config.newbiePostDelayThreshold}]]`);
|
||||
}
|
||||
} else if (now - lasttime < meta.config.postDelay * 1000) {
|
||||
throw new Error(`[[error:too-many-posts, ${meta.config.postDelay}]]`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user