mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
closes #2603
This commit is contained in:
@@ -5,5 +5,19 @@
|
|||||||
"month": "Month",
|
"month": "Month",
|
||||||
"year": "Year",
|
"year": "Year",
|
||||||
"alltime": "All Time",
|
"alltime": "All Time",
|
||||||
"no_recent_topics": "There are no recent topics."
|
"no_recent_topics": "There are no recent topics.",
|
||||||
|
|
||||||
|
"there-is-a-new-topic": "There is a new topic.",
|
||||||
|
"there-is-a-new-topic-and-a-new-post": "There is a new topic and a new post.",
|
||||||
|
"there-is-a-new-topic-and-new-posts": "There is a new topic and %1 new posts.",
|
||||||
|
|
||||||
|
"there-are-new-topics": "There are %1 new topics.",
|
||||||
|
"there-are-new-topics-and-a-new-post": "There are %1 new topics and a new post.",
|
||||||
|
"there-are-new-topics-and-new-posts": "There are %1 new topics and %2 new posts.",
|
||||||
|
|
||||||
|
"there-is-a-new-post": "There is a new post.",
|
||||||
|
"there-are-new-posts": "There are %1 new posts.",
|
||||||
|
|
||||||
|
"click-here-to-reload": "Click here to reload."
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -50,23 +50,36 @@ define('forum/recent', ['forum/infinitescroll'], function(infinitescroll) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Recent.updateAlertText = function() {
|
Recent.updateAlertText = function() {
|
||||||
var text = 'There';
|
var text = '';
|
||||||
|
|
||||||
if (newTopicCount > 1) {
|
if (newTopicCount === 0) {
|
||||||
text += ' are ' + newTopicCount + ' new topics';
|
if (newPostCount === 1) {
|
||||||
} else if (newTopicCount === 1) {
|
text = '[[recent:there-is-a-new-post]]';
|
||||||
text += ' is a new topic';
|
} else if (newPostCount > 1) {
|
||||||
|
text = '[[recent:there-are-new-posts, ' + newPostCount + ']]';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (newTopicCount === 1) {
|
||||||
|
if (newPostCount === 0) {
|
||||||
|
text = '[[recent:there-is-a-new-topic]]';
|
||||||
|
} else if (newPostCount === 1) {
|
||||||
|
text = '[[recent:there-is-a-new-topic-and-a-new-post]]';
|
||||||
|
} else if (newPostCount > 1) {
|
||||||
|
text = '[[recent:there-is-a-new-topic-and-new-posts, ' + newPostCount +']]';
|
||||||
|
}
|
||||||
|
} else if (newTopicCount > 1) {
|
||||||
|
if (newPostCount === 0) {
|
||||||
|
text = '[[recent:there-are-new-topics, ' + newTopicCount + ']]';
|
||||||
|
} else if (newPostCount === 1) {
|
||||||
|
text = '[[recent:there-are-new-topics-and-a-new-post, ' + newTopicCount + ']]';
|
||||||
|
} else if (newPostCount > 1) {
|
||||||
|
text = '[[recent:there-are-new-topics-and-new-posts, ' + newTopicCount + ', ' + newPostCount +']]';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newPostCount > 1) {
|
text += ' [[recent:click-here-to-reload]]';
|
||||||
text += (newTopicCount?' and ':' are ') + newPostCount + ' new posts';
|
|
||||||
} else if(newPostCount === 1) {
|
|
||||||
text += (newTopicCount?' and ':' is ') + ' a new post';
|
|
||||||
}
|
|
||||||
|
|
||||||
text += '. Click here to reload.';
|
$('#new-topics-alert').translateText(text).removeClass('hide').fadeIn('slow');
|
||||||
|
|
||||||
$('#new-topics-alert').html(text).removeClass('hide').fadeIn('slow');
|
|
||||||
$('#category-no-topics').addClass('hide');
|
$('#category-no-topics').addClass('hide');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user