FIX: too few topics/posts notice will only show what needs to be done
This commit is contained in:
parent
f321dd2046
commit
a2e51b0715
|
@ -46,7 +46,17 @@ export default Ember.Component.extend({
|
|||
|
||||
@computed('publicTopicCount', 'publicPostCount', 'topicTrackingState.incomingCount')
|
||||
message() {
|
||||
return new Handlebars.SafeString(I18n.t('too_few_topics_notice', {
|
||||
var msg = null;
|
||||
|
||||
if(this.get('publicTopicCount') < this.get('requiredTopics') && this.get('publicPostCount') < this.get('requiredPosts')) {
|
||||
msg = 'too_few_topics_and_posts_notice';
|
||||
} else if (this.get('publicTopicCount') < this.get('requiredTopics')) {
|
||||
msg = 'too_few_topics_notice';
|
||||
} else {
|
||||
msg = 'too_few_posts_notice';
|
||||
}
|
||||
|
||||
return new Handlebars.SafeString(I18n.t(msg, {
|
||||
requiredTopics: this.get('requiredTopics'),
|
||||
requiredPosts: this.get('requiredPosts'),
|
||||
currentTopics: this.get('publicTopicCount'),
|
||||
|
|
|
@ -701,7 +701,9 @@ en:
|
|||
read_only_mode:
|
||||
enabled: "Read-only mode is enabled. You can continue to browse the site but interactions may not work."
|
||||
login_disabled: "Login is disabled while the site is in read only mode."
|
||||
too_few_topics_notice: "Let's <a href='http://blog.discourse.org/2014/08/building-a-discourse-community/'>get this discussion started!</a> There are currently <strong>%{currentTopics} / %{requiredTopics}</strong> topics and <strong>%{currentPosts} / %{requiredPosts}</strong> posts. New visitors need some conversations to read and respond to."
|
||||
too_few_topics_and_posts_notice: "Let's <a href='http://blog.discourse.org/2014/08/building-a-discourse-community/'>get this discussion started!</a> There are currently <strong>%{currentTopics} / %{requiredTopics}</strong> topics and <strong>%{currentPosts} / %{requiredPosts}</strong> posts. New visitors need some conversations to read and respond to."
|
||||
too_few_topics_notice: "Let's <a href='http://blog.discourse.org/2014/08/building-a-discourse-community/'>get this discussion started!</a> There are currently <strong>%{currentTopics} / %{requiredTopics}</strong> topics. New visitors need some conversations to read and respond to."
|
||||
too_few_posts_notice: "Let's <a href='http://blog.discourse.org/2014/08/building-a-discourse-community/'>get this discussion started!</a> There are currently <strong>%{currentPosts} / %{requiredPosts}</strong> posts. New visitors need some conversations to read and respond to."
|
||||
|
||||
learn_more: "learn more..."
|
||||
|
||||
|
|
Loading…
Reference in New Issue